add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'
alter session set nls_timestamp_format = 'YYYY-MM-DD HH24:MI:SS.FF1'
alter session set nls_timestamp_tz_format = 'YYYY-MM-DD HH24:MI:SS.FF1 TZR'
select SYSDATE, SYSTIMESTAMP DBTIMEZONE from dual;
SYSDATE DBTIMEZONE
2022-09-06 18:06:04 2022-09-06 18:06:04.9 +01:00
select SYSTIMESTAMP, SYSTIMESTAMP at time zone 'UTC' from dual;
SYSTIMESTAMP SYSTIMESTAMPATTIMEZONE'UTC'
2022-09-06 18:06:04.9 +01:00 2022-09-06 17:06:04.9 UTC
select cast(SYSTIMESTAMP at time zone 'UTC' as date) from dual;
CAST(SYSTIMESTAMPATTIMEZONE'UTC'ASDATE)
2022-09-06 17:06:04
-- original
select round((SYSDATE - date '1970-01-01')*24*60*60) from dual;
ROUND((SYSDATE-DATE'1970-01-01')*24*60*60)
1662487564
select round((cast(SYSTIMESTAMP at time zone 'UTC' as date) - date '1970-01-01')*24*60*60) from dual;
ROUND((CAST(SYSTIMESTAMPATTIMEZONE'UTC'ASDATE)-DATE'1970-01-01')*24*60*60)
1662483964