SQL Server Date Formats — ffffd

前端 未结 6 550
迷失自我
迷失自我 2021-01-13 19:11

How do I get the day of the week (in ffffd format, so Mon, Tue etc.) in SQL ? I don\'t see anything about it in the CAST and CONVERT documentation..

6条回答
  •  醉话见心
    2021-01-13 19:30

    try this

    SELECT DATEPART(DW, '1/1/2009')
    

    Read up DATEPART here

    http://msdn.microsoft.com/en-us/library/ms174420.aspx

提交回复
热议问题