This function returns a number representing the day of the week.
WeekDay([Date],[Return Type])
Where:
Date is the date to return the weekday from
Return Type is a number representing the day in which the week starts
Return Type | Number returned |
---|---|
1 or Omitted | Numbers 1 (Sunday) through 7 (Saturday) |
2 | Numbers 1 (Monday) through 7 (Sunday) |
3 | Numbers 0 (Monday) through 6 (Sunday) |
11 | Numbers 1 (Monday) through 7 (Sunday) |
12 | Numbers 1 (Tuesday) through 7 (Monday) |
13 | Numbers 1 (Wednesday) through 7 (Tuesday) |
14 | Numbers 1 (Thursday) through 7 (Wednesday) |
15 | Numbers 1 (Friday) through 7 (Thursday) |
16 | Numbers 1 (Saturday) through 7 (Friday) |
17 | Numbers 1 (Sunday) through 7 (Saturday) |
Rule | Meaning |
---|---|
WeekDay(Today(),2) | If this function is called on a Monday it will return 1 as the return type is set to start counting Monday as the first day (2) |
WeekDay("10/08/2010") | This will return 6 as the date given falls on a Friday and the return type omitted which will start counting Sunday as the first day. |
DriveWorks Tech Tips Portal |
Date Picker This project shows how to use the date functionality within DriveWorks, taking things such as leap years into account. |
DriveWorks Tech Tips Portal is available to DriveWorks Pro customers with an active subscription and support contract. Tech Tips provide cut down projects that highlight specific functionality for faster and more effective learning. To access the portal:
The portal provides a search facility, start typing the name of the Tech Tip (as indicated above) to display the Tip you require. |