Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: date format in epoch

Re: date format in epoch

From: Anthony Ettinger <aettinger_at_sdsualumni.org>
Date: Tue, 16 May 2006 12:40:39 -0700
Message-ID: <3fc6b2fb0605161240r23092e0cq21cef791f8ef11d3@mail.gmail.com>


thanks!

On 5/16/06, Carel-Jan Engel <cjpengel.dbalert_at_xs4all.nl> wrote:
>
> To get sysdate converted in seconds since 01-JAN-1970 try this:
>
> select (SYSDATE - TO_DATE('01011970000000' , 'ddmmyyyyhh24miss')) * 86400 AS epoch_date
> FROM dual
> /
>
> Best regards,
>
> Carel-Jan Engel
>
> ===
> If you think education is expensive, try ignorance. (Derek Bok)
> ===
>
> On Tue, 2006-05-16 at 12:04 -0700, Anthony Ettinger wrote:
>
> I have dates in the database as "seconds since epoch"..
> I need to select items where start_time >= epoch(sysdate - 7);
> How do I get the sysdate converting to epoch easily within the sql code?
>
>
>
>

-- 
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 16 2006 - 14:40:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US