Thread: ...

...

From
Bhuvan A
Date:
Hi all,

Consider this..

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

Fine..

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


Something like this..
SELECT EXTRACT(TIMESTAMP FROM INTERVAL('1000467997 SECONDS'));


:)


Kindly Apologize for any inconvenience.

    ======================================================================           He who invents adages for others
toperuse           takes along rowboat when going on cruise.
======================================================================

Regards,
Bhuvaneswar.



Re:

From
Peter Eisentraut
Date:
Bhuvan A writes:

> SELECT EXTRACT(EPOCH FROM TIMESTAMP(now()));
>  date_part
> ------------
>  1000467997
> (1 row)
>
> Fine..
>
> Similarly, how could i get timestamp value for these SECONDS?

TIMESTAMP 'epoch' + INTERVAL 'N seconds'

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter