Day of month defaults to 1 in TO_DATE

  • From: Rich J <rjoralist3@xxxxxxxxxxxxxxxxxxxxx>
  • To: Oracle L <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 08 Mar 2019 11:00:32 -0600

Hey all, 

In versions 11.2.0.3, 12.1.0.2, 12.2.0.1, and 18 XE, I've run this: 

SQL> alter session set nls_date_format='YYYY/MM/DD HH24:MI:SS';

Session altered.

SQL> SELECT TO_DATE('19:09:47','HH24:MI:SS') FROM DUAL;

TO_DATE('19:09:47',
-------------------
2019/03/01 19:09:47 

The day of the month defaults to 1 in each case (today is the 8th and
I've run it on several other days).  Is this documented somewhere?  It
seems like I should have run into this before, or maybe just forgot over
the last 20 years... 

Thanks,
Rich

Other related posts: