Date and Time Constants
A number of
functions (DateDiff
,
DatePart
, Weekday
, and
WeekdayName
) have a
FirstDayOfWeek
parameter whose value can
be one of the day of the week constants (vbSunday
through vbSaturday
) as well as
vbUseSystemDayOfWeek
.
The DateDiff
and DatePart
functions also have a FirstWeekOfYear
parameter whose value can be vbUseSystem
,
vbFirstJan1
, vbFirstFourDays
,
vbFirstFullWeek
.
Constant |
Value |
Description |
---|---|---|
|
1 |
Sunday |
|
2 |
Monday |
|
3 |
Tuesday |
|
4 |
Wednesday |
|
5 |
Thursday |
|
6 |
Friday |
|
7 |
Saturday |
|
0 |
Use the date format defined by the local computer’s regional settings |
|
0 |
Use the day of the week specified in your system settings for the first day of the week |
|
1 |
Use the week in which January 1 occurs; this is the default value for
both |
|
2 |
Use the first week that has at least four days in the new year |
|
3 |
Use the first full week of the year |
Get VBScript in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.