I am having trouble pulling the date out of a datetime in magento.
Currently the date gets called using:
$_formatDate = Mage::app()->getLocale()->getDateTimeFormat( Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM ); $create_time = Mage::app()->getLocale() ->date($_order->getData('created_at'), Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($_formatDate);
I need the date in the format d-m-Y but I can't seem to work it out. I need something like:
$create_date = $create_time->toString('d-m-Y')