I am using SQL Server 2008.
I have the following:
select convert(varchar(20),fmdate) from Sery
How do I convert the date to string such that it show as MM/DD/YYYY
I am using SQL Server 2008.
I have the following:
select convert(varchar(20),fmdate) from Sery
How do I convert the date to string such that it show as MM/DD/YYYY
As of SQL Server 2012+, you can use <code>FORMAT(<i>value, format [, culture ]</i>)</code>
Where the format
param takes any valid standard format string or custom formatting string
Example:
SELECT FORMAT(GETDATE(), 'MM/dd/yyyy')
Further Reading: