Human readable UTC datetime

北城以北 提交于 2019-12-31 05:34:12

问题


I have date time in this format:

2017-04-01T17:35:00.000Z

how can I format it with Php and transform it in a nicer look to read?

I tried with:

date_format('2017-04-01T17:35:00.000Z',"F j, Y, g:i a");

and it returns me a false boolean


回答1:


PHP Code demo

<?php
$timestamp=  strtotime("2017-04-01T17:35:00.000Z");
echo date("F j, Y, g:i a",$timestamp);

Output:

April 1, 2017, 5:35 pm


来源:https://stackoverflow.com/questions/43309621/human-readable-utc-datetime

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!