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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -