Search code examples
phpsqlexcelfilemtime

Excel - Convert one time format to another


I'm trying to migrate data from one application to another via SQL imports, and I'm at the final step of grabbing the date of entry. The difficulty I'm experiencing is that the date is in some odd format.

Examples are as follows... 1360938606 1360938612 1360938607 1360938607

In the new application, the date format is as follows: 0000-00-00 00:00:00

Is there a way that I can convert the original format to this new format in Excel?

Thanks!


Solution

  • You can also try this :

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

    refer to http://php.net/manual/en/function.date.php