Here's a SQL statement that converts dates to epoch time in Oracle.
I'm too lazy to convert it to MySQL but it should give you a start.
select 86400 * ( to_date('14-feb-2000 10:38:39', 'dd-mon-yyyy
hh24:mi:ss')
- to_date('01-jan-1970', 'dd-mon-yyyy') )
from dual;
--Walt
> -----Original Message-----
> From: John Berman [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 13, 2004 9:51 AM
> To: [EMAIL PROTECTED]
> Subject: Epoch seconds
> Importance: High
>
>
> Hi
>
>
> I have a table that has start_date and expire_date in the
> format: 2004-12-31
>
> I also have a start field and expire field
>
> I need to convert the start_date to Epoch seconds and place
> in start and
> convert the expire_date and place in expire.
>
>
> I'm unsure how to convert and how to do this in one go via a query
>
> Help appreciated.
>
> Regards
>
>
>
> John Berman
> [EMAIL PROTECTED]
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?> [EMAIL PROTECTED]
>
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]