Rajesh Kumar Mallah mentioned :
=> Can anyone tell me how to convert epoch to timestamp ?
=> 
=> ie reverse of :
=> 
=> SELECT EXTRACT( epoch FROM  now() );
=> +------------------+
=> |    date_part     |
=> +------------------+
=> | 1130317518.61997 |
=> +------------------+

Here is one way (In my case I still had to add/subtract timezone diff)
select '19700101'::timestamp + foo.epoch::interval from (select extract(epoch 
from now())||' seconds' as epoch) foo ;

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to