sql - Oracle Convert Char to Date -
i have following date in oracle table:
'2017-08-01 00:00:00,000000000'
i want convert date using following don't know how deal zeroes?!
. . . t.execution_local_date_time between to_date('2017-08-01 00:00:00,000000000', 'yyyy-mm-dd hh:mi:ss') , to_date('2017-08-10 00:00:00,000000000', 'yyyy-mm-dd hh:mi:ss');
could me this?
oracle dates not support milliseconds. assuming execution_local_date_time
column date, following comparison best can do:
t.execution_local_date_time between to_date('2017-08-01 00:00:00', 'yyyy-mm-dd hh:mi:ss') , to_date('2017-08-10 00:00:00', 'yyyy-mm-dd hh:mi:ss');
if wanted convert text string milliseconds timestamp, use this:
to_timestamp ('2017-08-01 00:00:00,000000000', 'yyyy-mm-dd hh:mi:ss,ff')
Comments
Post a Comment