Reference > TDBDTCalcX Object > TDBDTCalcX Object Methods > DTCalc Method (TDBDTCalcX) |
DTCalc Method (TDBDTCalcX)
By calling the DTCalc method, the total amount of dates within the object will be added or subtracted from a date value specified in the date parameter.
object.DTCalc (Date, [StartDay])
date is a required Variant (Date): a string expression or literal representing a date to which the internal amount of values are added.
startday is an optional Boolean that determines whether to include the start day or not when adding and subtracting. If not specified, the start day will be excluded.
The startday argument has these settings:
True - Include the start day
False - Exclude the start day (Default)
A Variant (Date) containing a date to which the internal amount of values of the object has been added or subtracted. If date is set to Null or the result exceeds the range of 100/01/01 - 9999/12/31 (subtracting more years than in date), this method returns Null.
If the year part for date is omitted, DTCalc uses the current year from your system date. If date only includes date information, time will be automatically treated as 12:00:00 AM. However, if only time information is included, date will be treated as 0, which equals to 30-Dec-1899.
See Also