Take the 2-minute tour ×

This question already has an answer here:

How can I cast this string date to datetime in oracle.

Sun Apr 21 21:32:13 IRDT 2013

"IRDT" is the time zone and its equal in all records.

share|improve this question

marked as duplicate by Yasir Arsanukaev, Ben, John Doyle, Alex Poole, Blackbelt Mar 2 at 11:54


What is IRDT? Is that a time zone? –  Patashu May 21 '13 at 6:28
so you want from that string to get a date or a timestamp? –  Teshte May 21 '13 at 6:29
There are tons of examples available on Stackoverflow. Have you tried any of them? For example, "What is the Oracle date formatting mask for time zones?" –  Yasir Arsanukaev May 21 '13 at 6:33

2 Answers 2

up vote 2 down vote accepted

If you don't care about timezone and it is equal in all records you can try

SELECT TO_DATE('Sun Apr 21 21:32:13 IRDT 2013'
              ,'DY MON DD HH24:MI:SS "IRDT" YYYY') "date"
FROM dual;


|                         DATE |
| April, 21 2013 21:32:13+0000 |


But if you need to take into account and store timezone info then you might want to use TIMESTAMP WITH TIME ZONE data type and TO_TIMESTAMP_TZ()

share|improve this answer

Use this : http://www.techonthenet.com/oracle/functions/to_date.php

Basically you would use to_Date('Sun Apr 21 21:32:13 IRDT 2013','mask'), and you create the mask string using the table from that link

share|improve this answer
