@@DATEFIRST
Return Type:
tinyintFor US English, it gives:
1 for Monday
2 for Tuesday
3 for Wednesday
4 for Thursday
5 for Friday
6 for Saturday &
7 for Sunday.
For Example (for US English):
DATEPART(dw, anyDate) (Let on anyDate is Sunday)
--It will give 1 --
DATEPART(dw, anyDate) (Let on anyDate is Wednesday)
--It will give 4 --
Its value depends on:
1. The current active session of SET DATEFIRST
For example:
SET DATEFIRST 5 ( means we are setting Friday as the first day of week.)
DATEPART(dw, anyDate) (Let on anyDate is Sunday)
--It will give 3 --
For example:
SET DATEFIRST 5 ( means we are setting Friday as the first day of week.)
DATEPART(dw, anyDate) (Let on anyDate is Sunday)
--It will give 3 --
For example:
SET LANGUAGE Italian
SELECT
SET LANGUAGE us_english
SELECT