Re: [PHP] Convert excel time to date time

2010-07-19 Thread Richard Quadling
On 17 July 2010 12:47, Mohd Shakir bin Zakaria wrote: > 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)); > #

Re: [PHP] Convert excel time to date time

2010-07-17 Thread Ashley Sheridan
On Sat, 2010-07-17 at 19:47 +0800, Mohd Shakir bin Zakaria wrote: > 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)

[PHP] Convert excel time to date time

2010-07-17 Thread Mohd Shakir bin Zakaria
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",m