NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Date Constants

When using date-related functions, the following constants can be used in your code in place of the actual values:

Argument Values

Some date-related functions will take a firstdayofweek argument, while others will take a firstdayofyear argument. The constants specify the valid values for these arguments, as well as the possible return values from the functions

The firstdayofweek argument has the following values:

Constant Value Description
UseSystem
DayOfWeek
0 Use the day of the week specified in your system settings for the first day of the week.
Sunday 1 Sunday (default)
Monday 2 Monday
Tuesday 3 Tuesday
Wednesday 4 Wednesday
Thursday 5 Thursday
Friday 6 Friday
Saturday 7 Saturday

The firstdayofyear argument has the following values:

Constant Value Description
System 0 Use the day of the week specified in your system settings for the first day of the week.
Jan1 1 Start with week in which January 1 occurs (default).
FirstFourDays 2 Start with the first week that has at least four days in the new year.
FirstFullWeek 3 Start with the first full week of the year.

Return Values

Constant Value Description
Sunday 1 Sunday
Monday 2 Monday
Tuesday 3 Tuesday
Wednesday 4 Wednesday
Thursday 5 Thursday
Friday 6 Friday
Saturday 7 Saturday

See Also

Date Format Constants | DateDiff Function | DatePart Function | DriveType Constants | File Attribute Constants | File Input/Output Constants | Format Function | Tristate Constants | Visual Basic Constants | Weekday Function