SELECT DATENAME(dw, DATEADD(dd, - DATEPART(dd, GETDATE()) + 1, GETDATE())) AS FirstDay
In this Query, We used dw which is the abbreviations of weekday.
To Know, other abbreviations
-----------------------------------
Datepart - Abbreviations
-----------------------------------
year - yy, yyyy
quarter - qq, q
month - mm, m
dayofyear - dy, y
day - dd, d
week - wk, ww
weekday - dw
hour - hh
minute - mi, n
second - ss, s
millisecond - ms
-----------------------------------
No comments:
Post a Comment