max(to_char(date,'DD-MM-YYYY')) ?
greddyNov 1 2006 — edited Nov 1 2006Hi All,
SQL> desc hday;
Name Null? Type
------------------------- -------------- --------
H_DATE NOT NULL DATE
SQL> select max(h_date) from hday;
MAX(H_DATE
---------------
03-JAN-11
SQL> select max(to_char(h_date,'DD-MM-YY')) from hday;
MAX(TO_C
--------
31-12-99
SQL> select max(to_char(h_date,'DD-MON-YY')) from hday;
MAX(TO_CH
---------
31-MAY-99
My question is why am i getting different dates when i use different date formats in MAX function ?
any ideas ?
greddy