Re: Default month in TO_DATE

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 3 Mar 2009 20:08:43 +0100
Message-ID: <49ad8039$0$25553$426a74cc_at_news.free.fr>


"Malcolm Dew-Jones" <yf110_at_vtn1.victoria.tc.ca> a écrit dans le message de news: 4967e206$1_at_news.victoria.tc.ca...
|I don't see this in the TO_DATE documentation, and because it's January I
| can't see how to test this to confirm.
|
| select to_date('2009','YYYY') from dual;
| => shows 01-JAN-2009
|
| The day is defaulting to 1, but what of the month?
|
| - is the unspecified month defaulting to 1 (i.e. January)
|
| - or is the unspecified month defaulting to the current month (which just
| happens to be January because of when I ran the test).
|
|
| Thanks for any feedback.
|

SQL> select to_date('2009','YYYY') from dual; TO_DATE('2009','YYY



01/03/2009 00:00:00

1 row selected.

Regards
Michel Received on Tue Mar 03 2009 - 13:08:43 CST

Original text of this message