In my application am trying to format and sort the date, i am using to_char() function to format the date to my required format, but when i sort them it is sorting
to_char()
SELECT to_char( your_date_column, your_format_mask ) as formate_purpose, FROM your_table ORDER BY to_date (formate_purpose)
Try the above code