Tomasz Myrta <[EMAIL PROTECTED]> writes: > cast('1970-1-1' as timestamp)+cast(your_ticks || ' seconds' as interval)
> Does anyone know better way to cast it? The above will probably give the wrong answer (off by your timezone offset). The reference point should be zero hour GMT, but the first cast will give zero hour local time. You should cast the reference to timestamp with time zone (timestamptz) instead. Also, I'd suggest using float-times-interval as a simpler and more efficient way of forming the offset interval. So: select 'epoch'::timestamp with time zone + your_ticks * '1 second'::interval; regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings