ComponentOne True DBInput Pro 8.0
PrevWeekday Method (TDBDateX)

 

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.

Syntax

object.PrevWeekday ([Date], [Weekday])

Arguments

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

Return Value

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.

Remarks

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

NextWeekday Method (TDBDateX)

EnumWeekDays Method (TDBDateX)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback