I am trying to create a new table column which applies a 12 hour offset on another datetime column
select
dt_col,
DATE_SUB(dt_col, CAST(12 AS INTERVAL HOUR)) AS new_dt_col
from
tbl
select
tbl,
DATE_SUB(point_time, CAST(720 AS INTERVAL MINUTE)) AS tbl
from
tbl
Neither of this seem to work corectly.
I tried couple other ways (which work in Postgres/Presto) but not in Dremio
select
dt_col,
dt_col - interval ‘12 hours’ AS new_dt_col
from
tbl;
select
dt_col,
dt_col - ‘12 hour’::interval AS new_dt_col
from
tbl
Not sure what I am doing wrong here. Appreciate any help on this
Thanks