Query 1 : select to_char(sysdate,'DD-MON-YYYY') AS REQ_DATE from dual;
REQ_DATE
---------
01-FEB-17
If i execute query 2:
select to_DATE(sysdate,'DD-MON-YYYY') AS REQ_DATE from dual;
REQ_DATE
-----------
01-FEB-2017.
Actually, i want to display the date format in "DD-MON-YYYY". But, to_date function only displays "yy" not in "yyyy". Please explain the reason, as well the real purpose between these two functions in date related operations.