Reference > TDBDateX Object > TDBDateX Object Methods > PrevWeekday Method (TDBDateX) |
PrevWeekday Method (TDBDateX)
You can use the PrevWeekday method to retrieve the date of the previous specified weekday by setting weekday.
object.PrevWeekday ([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 previous 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. 19, 1998 for the previous Wednesday, and Aug. 13, 1998 for the previous Thursday.
If date is not specified, the date set in the Value property will be applied for the underlying value.
See Also