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



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

Parameters

months
Number of months.
precision
Number of significant digits of the month.
Exceptions
ExceptionDescription
The precision parameter is less than the TdIntervalMonth.MinPrecision or greater than the TdIntervalMonth.MaxPrecision range of values.
The months parameter specifies a TdIntervalMonth value less than TdIntervalMonth.MinValue or greater than TdIntervalMonth.MaxValue.
The precision parameter is not large enough to represent the number of months.
Remarks

The allowable values of precision are from 1 - 4.

The number of months is evaluated against TdIntervalMonth.MinValue and and TdIntervalMonth.MaxValue to determine if the values are exceeded. If the values are not exceeded but the resulting months component exceeds the supplied precision value, an exception is generated.

For example, a month value of 99 and a precision of 1 will generate an exception. The TdIntervalMonth.Months interval component cannot be represented in 1 significant digit, thus resulting in an invalid TdIntervalMonth.

Negative months may be supplied to represent negative duration of time.

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