Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Inconsistency while retrieving rows in sequel query.(To_Char)

Inconsistency while retrieving rows in sequel query.(To_Char)

From: Bmfcv <bmfcv_at_cs.com>
Date: 15 Jul 2001 02:14:11 GMT
Message-ID: <20010714221411.23516.00004348@ng-mg1.news.cs.com>

When I use YY as fromat model in TO_CHAR function, I get Sunday as the Day of my birthday.
And when I use YYYY as fromat Model I get Monday. Why is this inconsistency in Oracle? or Am I doing something wrong??? I use Oracle 8.1.6.

SQL> SELECT TO_CHAR(TO_DATE('01-20-75','MM-DD-YY'),'Day') "My Birthday" FROM dual;

My Birthd



Sunday

SQL> SELECT TO_CHAR(TO_DATE('01-20-1975','MM-DD-YYYY'),'Day') "My Birthday" FROM dual;

My Birthd



Monday Received on Sat Jul 14 2001 - 21:14:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US