Home > php教程 > php手册 > php 日期格式转换:php日期格式转换总结

php 日期格式转换:php日期格式转换总结

WBOY
Release: 2016-06-21 08:50:11
Original
1889 people have browsed it

php日期格式转换总结
//将当前时间转換成yyyy-mm-dd格式串,再转换成日期格式,绕了一圈哈
echo strtotime(date('Y-m-d',time()).' 00:00:00');
//将GNU 日期输入格式的字符转换成时间
echo strtotime('now');
//标准的字符串转换成时间
$t = '2012-9-10 15:18:06';
$time = strtotime($t);
//将时间转换成日期字符yyyymmdd,再转换成整型格式
$d = intval(date('Ymd',$time));
echo '付款时间:'.$d;
?> 本文链接http://www.cxybl.com/html/wlbc/Php/20130326/37398.html



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template