Pls am using TO_DATE function in my select stt. But its returning the wrong dates for me. In the database a text field contains 20021231. i want to convert it to date format and am using this format


I want the format above to return 31/12/2001 from 20021231 but its returning 20-feb-31.

Pls anyone have and idea how i can return exactly dd/mm/yyyy from 20021231.