Display date in specified format in Magento

Mage::helper(‘core’)->formatDate($date, $format, $showTime=false)

Argument 1: Date that you want change the format (This may be database driven or manual)
Argument 2: Date format: short, long, medium, full
Argument 3: Show Time: True to display time and false to not display time

********************
$newDate = date(“Y-m-d”, strtotime($dateatt));

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *