ComponentOne True DBInput Pro 8.0
InitValue Method (TDBDTCalcX)

 

Reference> TDBDTCalcX Object> TDBDTCalcX Object Methods> InitValue Method (TDBDTCalcX)

InitValue Method (TDBDTCalcX)

The InitValue method allows you to initialize the internal amount of dates and the underlying values, using the values argument. The value can be either a numeric expression or a Variant Date type. The interval of a numeric expression applied can be determined by the interval argument. Note that when a Variant Date type is applied, the interval argument will be ignored. A Variant Date type will be automatically converted to the total amount of dates. For example, if pass in a date such as "June 20, 1998", the internal value will be initialized as 1998 years, 6 months and 20 days. If the value is omitted a zero will be automatically applied. You can also use the ValueToDate method to retrieve the current internal value in date type.

Syntax

object.InitValueValue, [Interval]

Arguments

value is an optional Variant Date or a numeric expression for initializing the internal amount of date and time. If not specified or set to Null, a zero value will be automatically applied.

interval is an optional constant that determines the interval of the initialized numeric expression specified by the value argument. If a Variant Date type was applied to the value argument, this option will be ignored.

The interval argument has these settings:

0

Days (Default)

1

Months

2

Years

3

Seconds

4

Minutes

5

Hours

Return Value

None

Remarks

The days that make up one month is determined by the DaysPerMonth property and the hours that make up one day can be specified by the HoursPerDay property.

Whenever calling the InitValue method, the initial value will also be applied to the Years, Months, Days, Hours, Minutes and Seconds properties.

See Also

CalcValue Method (TDBDTCalcX)

GetTotals Method (TDBDTCalcX)

 

 


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

Product Support Forum  |  Documentation Feedback