Find maximum date using sqlserver
Hi All,I have a table with these datas
CreatedOn
Jan 24 2017 4:34PM
Mar 31 2017 5:34PM
Feb 27 2017 4:57PM
May 2 2017 1:14PM
Jun 29 2017 3:27PM
Sep 1 2017 2:26PM
Nov 28 2017 4:37PM
My requirement is to select the maximum date from this table.
the datafield type is nvarchar(50).
when I try to fetch the maximum date using following query
select MAX(createdon) from tablename,Iam getting following result
(No column name)
Sep 1 2017 2:26PM
why it is displaying september instead of november
Regards
Baiju