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, or vbFirstFullWeek.
Constant |
Value |
Description |
---|---|---|
vbSunday |
1 |
Sunday |
vbMonday |
2 |
Monday |
vbTuesday |
3 |
Tuesday |
vbWednesday |
4 |
Wednesday |
vbThursday |
5 |
Thursday |
vbFriday |
6 |
Friday |
vbSaturday |
7 |
Saturday |
vbUseSystem |
0 |
Use the date format defined by the local computer's regional settings |
vbUseSystemDayOfWeek |
0 |
Use the day of the week specified in your system settings for the first day of the week |
vbFirstJan1 |
1 |
Use the week in which January 1 occurs; this is the default value for both DateDiff and DatePart |
vbFirstFourDays |
2 |
Use the first week that has at least four days in the new year |
vbFirstFullWeek |
3 |
Use the first full week of the year |
Part I: The Basics
Introduction
Program Structure
Data Types and Variables
Error Handling and Debugging
VBScript with Active Server Pages
Programming Outlook Forms
Windows Script Host 5.6
VBScript with Internet Explorer
Windows Script Components
Part II: Reference
Part III: Appendixes
Appendix A. Language Elements by Category
Appendix B. VBScript Constants
Appendix C. Operators
Appendix E. The Script Encoder