SQL Server Date Formats — ffffd

前端 未结 6 502
迷失自我
迷失自我 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:53

    You can't ffffd out of the box but you can do the full day

    e.g.

    select datename(weekday,getdate())

    returns 'Monday' and you can just take the first 3 letters.

提交回复
热议问题