pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to Get Timestamp From SECONDS?
2+ messages / 2 participants
[nested] [flat]

* How to Get Timestamp From SECONDS?
@ 2001-09-14 13:25  Bhuvan A <bhuvansql@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Bhuvan A @ 2001-09-14 13:25 UTC (permalink / raw)
  To: pgsql-sql



Hi all,

Consider this..

SELECT EXTRACT(EPOCH FROM TIMESTAMP(now()));
 date_part
------------
 1000467997
(1 row)

Fine..

Similarly, how could i get timestamp value for SECONDS?
ie.. VICE VERSA


Something like this..

:)

select extract(timestamp from interval('1000467997 seconds'));

:)


Kindly Apologize for any inconvenience.


     ======================================================================
 			       "Help Mr. Wizard!"
 			      -- Tennessee Tuxedo
 				
     ======================================================================

Regards,
Bhuvaneswar.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: How to Get Timestamp From SECONDS?
@ 2001-09-15 08:56  Hans-Juergen Schoenig <hs@bachata.cybertec.at>
  parent: Bhuvan A <bhuvansql@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Hans-Juergen Schoenig @ 2001-09-15 08:56 UTC (permalink / raw)
  To: pgsql-sql

Try it with something like that:

mydata=# SELECT '1-1-2001'::timestamp + '200 seconds'::interval;
        ?column?
------------------------
 2001-01-01 00:03:20+01
(1 row)


epoch + seconds = desired timestamp.

    Hans




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-09-15 08:56 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-14 13:25 How to Get Timestamp From SECONDS? Bhuvan A <bhuvansql@yahoo.com>
2001-09-15 08:56 ` Hans-Juergen Schoenig <hs@bachata.cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox