ComponentOne True DBInput Pro 8.0
DayInfo Method (TDBDateX)

 

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

DayInfo Method (TDBDateX)

You can use the DayInfo method to determine the day of the (fiscal) year, the day of the (fiscal) year half, day of the (fiscal) year quarter and the day of the month for a given date. For example, Aug. 20, 1998 will return 232 for the day of year and 51 for the day of year half.

Syntax

object.DayInfo ([Date], [YearType], [TypeInfo])

Arguments

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

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

typeinfo is an optional constant that determines a period for calculating.

The yeartype argument has these settings:

0

Normal year (Deafult)

1

Fiscal year

The typeinfo argument has these settings:

0

Year (Default)

1

Year half

2

Year quarter

3

Month

Return Value

An integer corresponding to the day number of 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 -1.

Remarks

The date for the fiscal options will be calculated 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 typeinfo is set to 3-Month, the yeartype option will be ignored, since the type for the year will not make much sense in this case.

See Also

FirstMonth Property (TDBDate)

Year Property (TDBDateX)

Half Property (TDBDateX)

Quarter Property (TDBDateX)

FiscalYear Property (TDBDateX)

FiscalHalf Property (TDBDateX)

FiscalQuarter Property (TDBDateX)

Month Property (TDBDateX)

WeekInfo Method (TDBDateX)

 

 


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

Product Support Forum  |  Documentation Feedback