码迷,mamicode.com
首页 > 其他好文 > 详细

如何将int转换为datetime?

时间:2015-07-23 00:33:44      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

$timestamp = 1210003200;
$datetime = date(‘Y-m-d H:i:s‘, $timestamp);
echo "该时间戳代表的时间:", $datetime, "<br>\n";
echo "从此时间重新转回时间戳:", strtotime($datetime), "<br>\n";

 

如何将int转换为datetime?

标签:

原文地址:http://www.cnblogs.com/superfeeling/p/4669072.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!