Oracle to_date 函数.需要口罩

2022-01-15 00:00:00 mask format oracle to-date

我有来自此类 xml 文件的日期字符串:'2010-09-09T22:33:44.OZ'

I have string of date from xml file of such kind: '2010-09-09T22:33:44.OZ'

我只需要提取日期和时间.我想忽略符号 T 和 .OZ(时区).我应该使用哪种面膜?提前致谢

I need to extract only date and time. I want to ignore symbol T and .OZ (time zone). Which mask I should use? Thanks in advance

推荐答案

select TO_DATE('2010-09-09T22:33:44.OZ'
              ,'YYYY-MM-DD"T"HH24:MI:SS".OZ"')
from dual;

9/09/2010 10:33:44 PM

相关文章