Convert excel time to date time
| From: | Mohd Shakir bin Zakaria | Date: | Sat, 17 Jul 2010 11:47:52 +0000 |
| Subject: | Convert excel time to date time | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306954@lists.php.net to get a copy of this message | ||
Hi,
I've been trying to convert this excel date to the date time format,
but only managed to get it up to the seconds;
The following code;
#########
$data=39604.62164;
date("Y-m-d",mktime(0,0,0,1,$data-1,1900));
#########
will give this output
2008-06-05
changing it to
########
date("H-i-s",mktime(0,0,0,1,$data-1,1900));
########
will only give
00-00-00
The output I'm looking for is like this one;
2008-06-05 14:55:09
Any idea?