我是magento的新手,你能建议我吗
我想以以下格式显示订单日期和时间: 10:30pm 9th April
如果你想要没有年份的12:00 AM 9th September
话
$date = Mage::getModel('core/date')->date('Y-m-d');
echo $time = date('h:i A', strtotime($date)) . ' ' . date("jS F, ", strtotime($date));
如果你想与像今年12:00 AM 9th September, 2016
那么
$date = Mage::getModel('core/date')->date('Y-m-d');
echo $time = date('h:i A', strtotime($date)) . ' ' . date("jS F, Y", strtotime($date));
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句