0

I have $date = $run['at'];, which gives me 2013-06-03T16:52:24Z. How can I manipolate it to get for example "d M Y, H:i" ?

4

2 回答 2

1

您应该使用 DateTime 类。

$date = new DateTime($run['at']);
echo $date->format('d M Y, H:i');
于 2013-06-03T19:20:53.937 回答
0

您可以使用:

$time = strtotime($run['at']);
echo date("Y-m-d", $time);

但是,$run['at']从哪里来?

于 2013-06-03T19:19:50.880 回答