I want to add delivery data to order emails which will be 7 days after the order is created. Inside Mage_Sales_Model_Order::getCreatedAtFormated() function, following code returns order created date like November 29, 2015 7:04:52 PM IST

Mage::helper('core')->formatDate($this->getCreatedAtStoreDate(), $format, true);

If I'm using Mage::helper('core')->formatDate($this->getCreatedAtStoreDate()+(7*24*60*60), $format, true);, it's not returning correct result.

  • Can you include what it is returning? Commented Nov 30, 2015 at 8:33
  • @SanderMangel: sorry, it returns nothing.
    – amitshree
    Commented Nov 30, 2015 at 8:43

2 Answers 2


You can get order date with:

$date = Mage::app()->getLocale()->storeDate(
    Varien_Date::toTimestamp($order->getCreatedAt()) + (7*24*60*60),

Where $format is optional.

Assuming that the $order is Mage_Sales_Model_Order instance, the $date is Zend_Date instance which could be easily casted to string.


Need an customer email from the last 7 days through the created date

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.