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



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

Parameters

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

The number of days, hours and minutes are constructed into a TdIntervalDayToHour to determine if the TdIntervalDayToHour.MinValue or the TdIntervalDayToHour.MaxValue values are 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 TdIntervalDayToHour(444, 4, 2) requests 444 days and 4 hours 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. Mixed positive and negative constructor parameters are added together that result in a negative or positive TdIntervalDayToHour. For instance, a day value of 200, and an hour value of -4900 will result in a TdIntervalDayToHour interval value of -'4 04'.

Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdIntervalDayToHour Structure
TdIntervalDayToHour Members
Overload List