sql server convert date to string MM/DD/YYYY

前端 未结 5 1591
误落风尘
误落风尘 2020-11-27 20:14

I am using SQL Server 2008.

I have the following:

    select convert(varchar(20),fmdate) from Sery

How do I convert the date to str

5条回答
  •  一整个雨季
    2020-11-27 20:28

    select convert(varchar(10), fmdate, 101) from sery
    

    101 is a style argument.

    Rest of 'em can be found here.

    T-SQL Cast / Convert date to string

提交回复
热议问题