sql - Cast a string into datetime in Oracle -


this question has answer here:

how can cast string date datetime in oracle.

sun apr 21 21:32:13 irdt 2013 

"irdt" time zone , equal in records.

if don't care timezone , equal in records can try

select to_date('sun apr 21 21:32:13 irdt 2013'               ,'dy mon dd hh24:mi:ss "irdt" yyyy') "date" dual; 

output:

|                         date | -------------------------------- | april, 21 2013 21:32:13+0000 | 

sqlfiddle

but if need take account , store timezone info might want use timestamp time zone data type , to_timestamp_tz()


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -