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



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

Parameters

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

The number of months is evaluated against TdIntervalMonth.MinValue and and TdIntervalMonth.MaxValue to determine if the values are exceeded. The TdIntervalMonth.Precision is then calculated from the number of digits contained within the interval month component.

For example, a month value of 99 results in a precision of 2 representing 2 significant digits in the month.

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

TdIntervalMonth Structure
TdIntervalMonth Members
Overload List