'Usage Dim days As Integer Dim hours As Integer Dim instance As New TdIntervalDayToHour(days, hours)
Parameters
- days
- Number of days.
- hours
- Number of hours.
'Usage Dim days As Integer Dim hours As Integer Dim instance As New TdIntervalDayToHour(days, hours)
Exception | Description |
---|---|
OverflowException | The parameters specify a TdIntervalDayToHour value less than TdIntervalDayToHour.MinValue or greater than TdIntervalDayToHour.MaxValue. |
The number of days and hours are constructed into a TdIntervalDayToHour and evaluated against TdIntervalDayToHour.MinValue and TdIntervalDayToHour.MaxValue. The TdIntervalDayToHour.Precision is then calculated from the number of digits contained within the interval day component.
For example, 99 days and 28 hours is first constructed into a TdIntervalDayToHour. The TdIntervalDayToHour literal representation results in a TdIntervalDayToHour value of 100 days and 4 hours within the range of less than or equal to MaxValue and greater than or equal to the MinValue. Precision is calculated to be a value of 3 representing three significant digits in the day.
A day value of 2000 and 200000 hours is first constructed into a TdIntervalDayToHour. The TdIntervalDayToHour literal representation results in a TdIntervalDayToHour value of 10,333 days and 8 hours exceeding the maximum value of '9999 23'.
Negative constructor parameters may be supplied to represent negative durations of time. Mixed positive and negative constructor parameters are added together that result in a negative or positive TdIntervalDayToHour. For instance, a day value of 200, and an hour value of -4900 will result in a TdIntervalDayToHour interval value of -'4 04' with a calculated precision value of 1.
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2