From: shawn bright Date: 2006-11-12T03:12:53+09:00 Subject: Re: best way to get epoch seconds from mysql datetime value ------=_Part_4841_19990405.1163268769789 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline i suppose i could use that, i am working with mysql 5 ( oh, the luxury ) i am just not that knowledgeable with it. thanks On 11/11/06, Aleksandar Lazic wrote: > > Hi, > > On Son 12.11.2006 01:32, shawn bright wrote: > >Hey there all, > > > >if i have a mysql datetime value that looks like this: > >some_time = '2006-05-11 05:14:14' > > > >and i want to get seconds since the unix epoch, how would i go about > >that ? > > If you have the possibility to use mysql why not to use the builtin > function: > > UNIX_TIMESTAMP(date) > > from http://www.mysql.org/doc/refman/4.1/en/date-and-time-functions.html > > Due the fact that I don't know which version of mysql you use I have > looked into the lowest possible version ;-) > > Hth > > Aleks > > ------=_Part_4841_19990405.1163268769789--