sql - Truncating timestamps -
let's suppose have timestamp variable:
select timestamp '2011-02-24 08:30:42 +06:00' dual;
is there way "truncate" like
'2011-02-24 08:00:00 +06:00'
(i've cut minutes , seconds, left timezone)
the target oracle version 11g r2
sql> select to_timestamp_tz(to_char(timestamp '2011-02-24 08:30:42 +06:00', 'yyyy-mm-dd hh24 tzh:tzm'), 'yyyy-mm-dd hh24 tzh:tzm') dual; to_timestamp_tz(to_char(timestamp'2011-02-2408:30:42+06:00','yyyy-mm-ddtzh: --------------------------------------------------------------------------- 24.02.2011 8:00:00,000000000 +06:00
Comments
Post a Comment