如何将yyyy-MM-dd HH:mm:ss转换为“2010年4月15日”使用PHP [英] How to convert yyyy-MM-dd HH:mm:ss to "15th Apr 2010" using PHP
本文介绍了如何将yyyy-MM-dd HH:mm:ss转换为“2010年4月15日”使用PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下日期格式: 2010-04-15 23:59:59
我将如何将其转换为: 2010年4月15日
谢谢
解决方案
回显日期(jS MY,strtotime(2010-04-15 23:59:59)); pre>
I have the following date format: 2010-04-15 23:59:59
How would I go about converting this into: 15th Apr 2010
Thanks
解决方案
echo date("jS M Y",strtotime("2010-04-15 23:59:59"));
这篇关于如何将yyyy-MM-dd HH:mm:ss转换为“2010年4月15日”使用PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文