Re: date format in epoch
- From: "Anthony Ettinger" <aettinger@xxxxxxxxxxxxxx>
- To: cjpengel.dbalert@xxxxxxxxx
- Date: Tue, 23 May 2006 13:08:12 -0700
I have a timestamp in seconds since the epoch, how do I get it back into a human-readable date?
ie - to_date('$secs_since_epoch', 'yyyymmdd') ?
On 5/16/06, Carel-Jan Engel <cjpengel.dbalert@xxxxxxxxx> 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 /
=== 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