timestamp converting into junk
Posted: Mon Mar 14, 2005 11:00 am
I figure this is probably a very noobie problem, but I haven't found the answer in my books or on php.net.
How do I convert a timestamp from a MySql database (type timestamp) into seconds since the Unix Epoch
I thought this would do the trick:
$myTime = 20050314000000;
$newTime = date('U', $myTime);
$newTime is coming out to some date in the year 2017...obviously not correct.
Please help
How do I convert a timestamp from a MySql database (type timestamp) into seconds since the Unix Epoch
I thought this would do the trick:
$myTime = 20050314000000;
$newTime = date('U', $myTime);
$newTime is coming out to some date in the year 2017...obviously not correct.
Please help