Oracle to_date with p.m./a.m

一曲冷凌霜 提交于 2019-12-02 00:31:18

Try this:

to_date
  ( '08/11/1999 05:45:00 p.m.'
  , 'dd/mm/yyyy hh:mi:ss a.m.'
  , 'nls_date_language=american'
  )

It seems that "a.m." and "p.m." rather than "am" and "pm" require nls_date_language to be set to "american".

to convert time for am and pm, just give a.m. like below

to_date(UPPER('08/11/1999 05:45:00 p.m.'),'dd/mm/yyyy hh:mi:ss a.m.')

hope this might help. please refer https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions183.htm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!