Send feedback on this topic.
Teradata.Client.Provider
TdIntervalYear Constructor(Int32)



Teradata.Client.Provider Namespace > TdIntervalYear Structure > TdIntervalYear Constructor : TdIntervalYear Constructor(Int32)
Number of years.
An instance of TdIntervalYear is created from a year date component specified as an integer.
Syntax
'Declaration
 
Public Function New( _
   ByVal years As Integer _
)
'Usage
 
Dim years As Integer
 
Dim instance As New TdIntervalYear(years)
public TdIntervalYear( 
   int years
)
public:
TdIntervalYear( 
   int years
)

Parameters

years
Number of years.
Exceptions
ExceptionDescription
The years parameter specifies a TdIntervalYear value less than TdIntervalYear.MinValue or greater than TdIntervalYear.MaxValue.
Remarks

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.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdIntervalYear Structure
TdIntervalYear Members
Overload List