[Info-ingres] _time() and _date_gmt()
Ingres Forums
info-ingres at kettleriverconsulting.com
Mon Feb 2 11:17:06 UTC 2015
How about using the "interval" function for getting the seconds since
01-jan-1970, e.g.:
select int4(interval('sec', date('now')-'01-jan-1970 00:00:00 GMT'))
For getting the date from a given number of seconds since 01-jan-1970
you could use the "gmt_timestamp" function, e.g.:
select gmt_timestamp(1422875366)
returns 2015_02_02 11:09:26 GMT
--
Bodo
------------------------------------------------------------------------
Bodo's Profile: http://community.actian.com/forum/member.php?userid=16
View this thread: http://community.actian.com/forum/showthread.php?t=16597
More information about the Info-ingres
mailing list