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



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

Parameters

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

The number of days is constructed into a TdIntervalDay and validated to determine if the TdIntervalDay.MinValue or the TdIntervalDay.MaxValue values have been exceeded. If the values are not exceeded but the resulting days component exceeds the supplied precision value, an exception is generated.

For example a constructor for TdIntervalDay(444, 2) requests 444 days with a precision of 2. The resulting days value cannot be represented in 2 digits, therefore an exception is generated, even though the MinValue and the MaxValue values have not been exceeded.

Negative constructor parameters may be supplied to represent negative durations of time.

Requirements

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

See Also

Reference

TdIntervalDay Structure
TdIntervalDay Members
Overload List