I have two kind of date format in my table now I want to show the date as order by.
The results look like this:
I want to display the records in ascending format in single format
Any help would be really appreciated
In SQL Server, it is easiest to convert strings using the built in
convert() formats. This is a big inconvenience. You can try:
order by coalesce(try_convert(datetime, meeting_status_date), try_convert(datetime, meeting_status_date, 0), try_convert(datetime, meeting_status_date, 101) )
NULL if the conversion fails. The list of conversion formats is here.