我的日期和时间字符串是:January 28, 2010 1417,最后四个数字是时间。我应该如何将它转换成mysql可以接受的字符串呢?
当我尝试使用strtotime时,我得到了Warning: strtotime(): It is not safe to rely on the system's timezone settings.
发布于 2013-08-09 21:34:04
$timestamp = strtotime($string);
date("Y-m-d H:i:s", $timestamp);发布于 2013-08-09 21:34:46
DateTime::createFromFormat($timeString, 'F d, Y Hi')->format('Y-m-d H:i:s');(您可能需要弄清楚您的时间字符串是在月份的某一天使用前导零:“1月05”还是“1月5日”?)
发布于 2013-08-09 21:33:56
https://stackoverflow.com/questions/18155957
复制相似问题