Excel -转换一个时间格式到另一个


Excel - Convert one time format to another

我正试图通过SQL导入将数据从一个应用程序迁移到另一个应用程序,并且我正处于抓取条目日期的最后一步。我遇到的困难是日期的格式很奇怪。

例子如下…1360938606136093861213609386071360938607

在新的应用程序中,日期格式如下:0000-00-00就是

是否有一种方法可以将原始格式转换为Excel中的新格式?

谢谢!

你也可以试试这个:

$newdateformat = date('Y-m-d H:i:s', $oldtimestamp);

参考http://php.net/manual/en/function.date.php

看起来像unix时间戳和Mark提到的…这其实是很标准的。你可以使用strftime从php转换成你想要的字符串格式:

$time = strftime('%F %T', (int) $thevalue)