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



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

Parameters

days
Number of days.
hours
Number of hours.
minutes
Number of minutes.
precision
Number of significant digits of the day.
Exceptions
ExceptionDescription
The parameters specify a TdIntervalDayToMinute value less than TdIntervalDayToMinute.MinValue or greater than TdIntervalDayToMinute.MaxValue.
The precision parameter is outside the TdIntervalDayToMinute.MinPrecision or TdIntervalDayToMinute.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 TdIntervalDayToMinute to determine if the TdIntervalDayToMinute.MinValue or the TdIntervalDayToMinute.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 TdIntervalDayToMinute(444, 4, 9, 2) requests 444 days, 4 hours and 9 minutes 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 TdIntervalDayToMinute. For instance, a day value of 200, an hour value of -4900 and a minute value of 30 will result in a TdIntervalDayToMinute interval value of -'4 03:30'.

Requirements

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

See Also

Reference

TdIntervalDayToMinute Structure
TdIntervalDayToMinute Members
Overload List