• Thanks Kelsey.

    Yes i might be mistaken, the format is American not English.

    Btw, even i like that Japanese format.

    Well, its quite easy to modify the script to get the weekday according to the format.

    If Monday is the first day of the week in English format. The original setting of datefirst will be 1

    Try selecting

    SELECT @@DATEFIRST

    SELECT DATEPART(dw, '2009-12-17')

    -- 4 (If @@Datefirst is 1)

    To make it universal, just require a small change in the code

    SELECT (DATEPART(dw, '2009-12-17') + @@DATEFIRST-1) % 7 AS dw

    Now, try changing the datefirst setting and you will always get 4 for every DATEFIRST setting by running the above code.

    --Divya