'Usage Dim timeSpan As TimeSpan Dim instance As New TdIntervalDayToSecond(timeSpan)
Parameters
- timeSpan
- A TimeSpan to initialize TdIntervalDayToSecond.
'Usage Dim timeSpan As TimeSpan Dim instance As New TdIntervalDayToSecond(timeSpan)
Exception | Description |
---|---|
OverflowException | The timespan parameter specifies a TdIntervalDayToSecond value less than TdIntervalDayToSecond.MinValue or greater than TdIntervalDayToSecond.MaxValue. |
The TimeSpan value is converted into a TdIntervalDayToSecond and evaluated against TdIntervalDayToSecond.MinValue and TdIntervalDayToSecond.MaxValue. The TdIntervalDayToSecond.Precision is then calculated from the number of digits contained within the interval day component and the TdIntervalDayToSecond.Scale is calculated from the number of decimal places required to represent the fractional seconds.
After conversion of the TimeSpan value into TdIntervalDayToSecond, any fractional seconds will be truncated according the the TdIntervalDayToSecond.MaxScale value of 6 decimal places. For example, a TimeSpan value created with a TimeSpan.Ticks value of 8726341234567 results in a value of 10 days, 2 hours, 23 minutes, and 54.1234567 seconds. The TdIntervalDayToSecond literal representation results in a TdIntervalDayToSecond value of '10 02:23.123456'. The .1234567 seconds value is truncated by one significant digit. Precision is calculated to be a value of 2 representing two significant digits in the day.
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