sql - Cast a string into datetime in Oracle -
this question has answer here:
- oracle to_date function. mask needed 2 answers
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 |
but if need take account , store timezone info might want use timestamp time zone
data type , to_timestamp_tz()
Comments
Post a Comment