'Usage Dim timeSpan As TimeSpan Dim instance As New TdIntervalDay(timeSpan)
Parameters
- timeSpan
- A TimeSpan to initialize TdIntervalDay.
'Usage Dim timeSpan As TimeSpan Dim instance As New TdIntervalDay(timeSpan)
Exception | Description |
---|---|
OverflowException | The timespan parameter specifies a TdIntervalDay value less than TdIntervalDay.MinValue or greater than TdIntervalDay.MaxValue. |
The TimeSpan value is converted into a TdIntervalDay and evaluated against TdIntervalDay.MinValue and TdIntervalDay.MaxValue. The TdIntervalDay.Precision is then calculated from the number of digits contained within the interval day component.
After conversion of the TimeSpan value into a TdIntervalDay, any hours, 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 TdIntervalDay literal representation results in a TdIntervalDay value of '10'. The 20 hours, 30 minutes and the 40.1234567 seconds values are truncated. Precision is calculated to be a value of 2 representing two significant digits in the day.
Product | Versions | Platforms |
---|---|---|
.NET | 6, 7 | Windows, Linux, MacOS |
.NET Framework | 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 | Windows |
.NET Standard | 2.0 | Windows, Linux, MacOS |