龙岩易富通网络科技有限公司

龙岩小程序开发,龙岩分销系统

时间格式转换问题

2015.09.10 | 32阅读 | 0条评论 | 未命名

最近将一个网站的mssql数据库导入到phpcms的mysql中,mssql数据库中时间格式为2004-3-1 16:58:00,导入到mysql格式为1265264139 通过strtotime() 函数将任何英文文本的日期时间描述解析为 Unix 时间戳。 [php] <?php echo(strtotime("now")); echo(strtotime("3 October 2005")); echo(strtotime("+5 hours")); echo(strtotime("+1 week")); echo(strtotime("+1 week 3 days 7 hours 5 seconds")); echo(strtotime("next Monday")); echo(strtotime("last Sunday")); ?> [/php]

赞 (

发表评论