If time zone information is required:
select to_timestamp_tz('2010-09-09T22:33:44.GMT','YYYY-MM-DD"T"HH24:MI:SS.TZR') from dual; 09-SEP-10 22.33.44.000000000 GMT
But OZ not a recognized time zone reduction, so you need to do some preliminary conversion of what is.
If you just want to ignore this part and it is fixed, you can do what @Jeffrey Kemp said:
select to_date('2010-09-09T22:33:44.OZ','YYYY-MM-DD"T"HH24:MI:SS."OZ"') from dual; 09/09/2010 22:33:44
If you want to ignore it, but it is not fixed, you first need to trim it, something like (using the binding variable here for short):
var input varchar2(32); exec :input := '2010-09-09T22:33:44.OZ'; select to_date(substr(:input,1,instr(:input,'.') - 1),'YYYY-MM-DD"T"HH24:MI:SS') from dual; 09/09/2010 22:33:44
Alex poole
source share