'Usage Dim timeSpan As TimeSpan Dim precision As Byte Dim instance As New TdIntervalDayToHour(timeSpan, precision)
Parameters
- timeSpan
- A TimeSpan to initialize TdIntervalDayToHour.
- precision
- Number of significant digits of the day.
'Usage Dim timeSpan As TimeSpan Dim precision As Byte Dim instance As New TdIntervalDayToHour(timeSpan, precision)
Exception | Description |
---|---|
OverflowException | The timespan parameter specifies a TdIntervalDayToHour value less than TdIntervalDayToHour.MinValue or greater than TdIntervalDayToHour.MaxValue. |
ArgumentOutOfRangeException | The precision parameter is outside the TdIntervalDayToHour.MinPrecision or TdIntervalDayToHour.MaxPrecision range of values. |
ArgumentException | The precision parameter is not large enough to represent the number of days. |
The TimeSpan value is converted into a TdIntervalDayToHour and evaluated against TdIntervalDayToHour.MinValue and TdIntervalDayToHour.MaxValue. If the values are not exceeded but the resulting days component exceeds the supplied parameter precision value, an exception is generated.
After conversion of the TimeSpan value into a TdIntervalDayToHour, any minutes, seconds or microseconds will be truncated. For example, a TimeSpan value created with a TimeSpan.Ticks value of 9378401234567 results in a value of 10 days, 20 hours, 30 minutes and 40.1234567 seconds. The TdIntervalDayToHour literal representation results in a TdIntervalDayToHour value of '10 20'. The 30 minutes and the 40.1234567 seconds values are truncated.
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