Default is sunday as first day of the week. This can be changed on spidlevel ( remains only in the spids context).
set datefirst 1
Changes the first day of the week to monday.
SELECT @@DATEFIRST AS '1st Day', DATEPART(dw, GETDATE()) AS 'Today'
tests the first day and shows what day it is today.
SELECT DATEPART(week, GETDATE()) AS 'week Number'
shows weeknumber.
No comments:
Post a Comment