FROM_TZ
select
timestamp '2023-08-05 18:17:16' ts,
from_tz(timestamp '2023-08-05 18:17:16', 'Europe/Zurich') ts_zrh
from
dual;
--
-- TS TS_ZRH
-- ----------------------------- -------------------------------------------
-- 2023-08-05 18.17.16.000000000 2023-08-05 06.17.16.000000000 EUROPE/ZURICH
ADJ_DATE
The undocumented function
adj_date
round (truncates) a
timestamp
down to a non-fractional second.
create table tq84_t (
ts timestamp
);
insert into tq84_t values (systimestamp);
select
ts,
adj_date(ts) ts_
from
tq84_t;
--
-- TS TS_
-- ----------------------------- -----------------------------
-- 2022-02-23 18:46:58.658000000 2022-02-23 18:46:59.000000000
drop table tq84_t;
It seems that the function can only be used when applied on a column value. The following statement throws a
ORA-00932: inconsistent datatypes: expected DATE got TIMESTAMP WITH TIME ZONE error.
select
adj_date(systimestamp)
from
dual;