ComponentOne True DBInput Pro 8.0
StartDate Method (TDBDateX)

 

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

StartDate Method (TDBDateX)

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

Syntax

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

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.

yeartype is an optional constant that determines whether to use the normal year or the fiscal year. The yeartype argument has these settings:

0

Normal year (Default)

1

Fiscal year

periods is an optional constant that determines which period to use in date calculations. 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 date value within the specified period. If date is set to Null or the target date is not within the specified period, this method returns Null.

Remarks

For example, Aug. 20, 1998 will return Jan. 1, 1998 for the start date of the year and Jul. 1, 1998 for the second 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

Value Property (TDBDateX)

FirstMonth Property (TDBDate)

Year Property (TDBDateX)

Half Property (TDBDateX)

Quarter Property (TDBDateX)

FiscalYear Property (TDBDateX)

FiscalHalf Property (TDBDateX)

FiscalQuarter Property (TDBDateX)

Month Property (TDBDateX)

EndDate Method (TDBDateX)

 

 


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

Product Support Forum  |  Documentation Feedback