From: Aleksandar Lazic Date: 2006-11-12T02:53:12+09:00 Subject: Re: best way to get epoch seconds from mysql datetime value 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