Reference > TDBDateX Object > TDBDateX Object Methods > NextWeekday Method (TDBDateX) |
NextWeekday Method (TDBDateX)
You can use the NextWeekday method to retrieve the date of the next specified weekday by setting weekday.
object.NextWeekday ([Date], [Weekday])
date is an optional Variant (Date): a value that determines the underlying date. If not specified, the date set in the Value property will be applied.
weekday is an optional constant that determines which weekday to return.
The weekday argument has these settings:
1 |
Sunday (Default) |
2 |
Monday |
3 |
Tuesday |
4 |
Wednesday |
5 |
Thursday |
6 |
Friday |
7 |
Saturday |
A date value representing the upcoming weekday. If date is set to Null or the result exceeds the range from 100/01/01 to 9999/12/31, this method returns Null.
For example, Aug. 20, 1998 (Thursday) will return Aug. 21, 1998 for the next Friday and Aug. 27, 1998 for the next Thursday. If date is not specified, the date set in the Value property will be applied for the underlying value.
See Also