I have tried the solution like Customer created_at Date off by months

when I use it it gives me error like

Call to undefined method Mage_Eav_Model_Entity_Attribute_Backend_Time_Created::_getFormat( )

even I have override by placing the created.php file in app/code/local/Mage/Eav/Model/Entity/Attribute/Backend/Time

1 Answer 1


_getFormat() method is not available in Mage_Eav_Model_Entity_Attribute_Backend_Time_Created by default. I dont know, but I believe may be @Taylor is wrong in the usage of the function _getFormat().

The correct formatted code is now available from Magento version This is not included in default Magento or lower versions. So use that file instead of your default Created.php.

Note : When you override via local pool, make sure the file name is Created.php and not created.php. As Taylor pointed out in his answer, it is not a good practice to rewrite via local codepool. Instead use a module rewrite.

  • My file name is allready Created.php. I got the same error when i have override it to my custom module.
    – divyang
    Jun 30, 2015 at 7:37
  • replace file content with the content in the link that I have provided and then check again Jun 30, 2015 at 7:37
  • I found the solution , placed the function protected function _getFormat($date) { if (is_string($date) && preg_match('#^\d{4,4}-\d{2,2}-\d{2,2} \d{2,2}:\d{2,2}:\d{2,2}$#', $date)) { return 'yyyy-MM-dd HH:mm:ss'; } return null; } and works fine
    – divyang
    Jul 8, 2015 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.