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()
The easiest way is to retrieve the same field with the query again and doing sorting based upon that filed
In your example
SELECT to_char( your_date_column, your_format_mask ) as formate_purpose, your_date_column as sorting_purpose FROM your_table ORDER BY your_date_column