How to get current date in magento?

To get current date you have to put this code in your phtml file and this phtml file was called by the page where you want to showing it.


<?php echo date(“Y-m-d”, Mage::getModel(‘core/date’)->timestamp(time()));?>

Post A Comment

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