'Usage Dim years As Integer Dim instance As New TdIntervalYear(years)
Parameters
- years
- Number of years.
'Usage Dim years As Integer Dim instance As New TdIntervalYear(years)
Exception | Description |
---|---|
OverflowException | The years parameter specifies a TdIntervalYear value less than TdIntervalYear.MinValue or greater than TdIntervalYear.MaxValue. |
The number of years is evaluated against TdIntervalYear.MinValue and and TdIntervalYear.MaxValue to determine if the values are exceeded. The TdIntervalYear.Precision is then calculated from the number of digits contained within the interval year component.
For example, a year value of 99 results in a precision of 2 representing 2 significant digits in the year.
A year value of 10020 exceeds the the maximum value of '9999-11' generating an exception.
Negative constructor parameters may be supplied to represent negative durations of duration.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019