RE: Epoch seconds

2004-12-14 Thread John Berman
Thanks for the responses Regards John Berman -Original Message- From: Weaver, Walt [mailto:[EMAIL PROTECTED] Sent: 14 December 2004 14:43 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Epoch seconds Here's a SQL statement that converts dates to epoch time in Oracle. I'm too

Re: Epoch seconds

2004-12-13 Thread Roger Baklund
John Berman wrote: I have a table that has start_date and expire_date in the format: 2004-12-31 That is an output format... yes? If the column is a string type (char/varchar/text...), you should change it to a DATE type, or maybe TIMESTAMP. The default output format for DATE type columns is

RE: Epoch seconds

2004-12-13 Thread Weaver, Walt
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- hh24:mi:ss') - to_date('01-jan-1970', 'dd-mon-') ) from dual; --Walt