Reference > TDBDTCalcX Object > TDBDTCalcX Object Methods > ValueToDate Method (TDBDTCalcX) |
ValueToDate Method (TDBDTCalcX)
The ValueToDate method can be used to directly convert the internal amount of dates into date type. For example, 2000 years, 6 months and 20 days will be converted to a Variant (Date) - June 20, 2000. If the internal value can not be converted properly, this method returns Null. For example, 50 years, 12 months and 40 days will return Null. You can also use the InitValue property to initialize the internal values in date type.
object.ValueToDate
None
The internal date amounts expressed as a date, or Null if these amounts cannot be converted into a date.
The total amount of dates can be referenced by the Years, Months, Days, Hours, Minutes and the Seconds properties.
The ValueToDate method can be used to retrieve the exact pay day for each month, adding 30 days from the initial value. This method helps you to retrieve the correct day without differentiating the amount of days in months.
You can use the TDBHolidayX object in combination to determine whether the days you land on are holidays or not, and depending on the result you can also adjust the pay day accordingly to a work day.
See Also
DaysPerMonth Property (TDBDTCalcX)
HoursPerDay Property (TDBDTCalcX)