ComponentOne True DBInput Pro 8.0
EndDate Method (TDBDateX)

 

Reference> TDBDateX Object> TDBDateX Object Methods> EndDate Method (TDBDateX)

EndDate Method (TDBDateX)

You can use the EndDate method to retrieve the ending date in the specific period by setting yeartype and periods for a given date.

Syntax

object.EndDate ([Date], [YearType], [Periods])

Arguments

date is an optional Variant (Date) that determines the underlying date. If not specified, the date set in the Value property will be applied.

yeartype is an optional constant that determines whether to use the normal year or the fiscal year.

periods is an optional constant that determines a period.

The yeartype argument has these settings:

0

Normal year (Default)

1

Fiscal year

The periods argument has these settings:

0

Year (Default)

1

First half

2

Second half

3

First quarter

4

Second quarter

5

Third quarter

6

Fourth quarter

7

Month

Return Value

A Variant (Date) containing the ending date for the specified period. If date is set to Null or the specified period exceed and does not exist in the range from 100/01/01 to 9999/12/31, this method returns Null.

Remarks

For example, Aug. 20, 1998 will return Dec. 31, 1998 for the end date of the year and Jun. 30, 1998 for the first half of the year.

The date for the fiscal options will be retrieved based on the month set by the FirstMonth property.

If date is not specified, the date set in the Value property will be applied for the underlying value.

When periods is set to 7-Month, the yeartype option will be ignored, since the type for the year will not make much sense in this case.

The day part for the underlying date may not have any particular meaning, but it is still required since the date must be defined as a valid Date type.

See Also

Year Property (TDBDateX)

Half Property (TDBDateX)

Quarter Property (TDBDateX)

FiscalYear Property (TDBDateX)

FiscalHalf Property (TDBDateX)

FiscalQuarter Property (TDBDateX)

Month Property (TDBDateX)

StartDate Method (TDBDateX)

 

 


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

Product Support Forum  |  Documentation Feedback