开发者

How to convert "2011-02-14 16:14:57" into DD/MM/YYYY format in PHP?

I have a task to display the date in DD/MM/YYYY form开发者_开发技巧at, But I Have date stored as "2011-02-14 16:14:57" format, hence how can i convert it to get the DD/MM/YYYY in PHP?


echo date("d/m/Y", strtotime("2011-02-14 16:14:57"));

If you want more ways to do it, see PHP datetime extension.


Check this

Convert to date format dd/mm/yyyy


$n      =   "2011-02-14 16:14:57";
echo $time_output=date("d/m/Y",strtotime($n));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜