11 Jul
2007
11 Jul
'07
8:26 p.m.
Does anyone have a way of extracting the number of seconds since 1970/01/01 00:00:00 GMT from a timestamp? I have the following stored procedure (aka PSM) is but it doesn't account for DST nor the server's timezone. CREATE FUNCTION sp_convert_timestamp_to_epoch (in_ts timestamp(3)) returns integer return (in_ts - cast('1970/01/01 00:00' as timestamp(3))) / 1000;