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



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

Parameters

days
Number of days.
hours
Number of hours.
Exceptions
ExceptionDescription
The parameters specify a TdIntervalDayToHour value less than TdIntervalDayToHour.MinValue or greater than TdIntervalDayToHour.MaxValue.
Remarks

The number of days and hours are constructed into a TdIntervalDayToHour and evaluated against TdIntervalDayToHour.MinValue and TdIntervalDayToHour.MaxValue. The TdIntervalDayToHour.Precision is then calculated from the number of digits contained within the interval day component.

For example, 99 days and 28 hours is first constructed into a TdIntervalDayToHour. The TdIntervalDayToHour literal representation results in a TdIntervalDayToHour value of 100 days and 4 hours within the range of less than or equal to MaxValue and greater than or equal to the MinValue. Precision is calculated to be a value of 3 representing three significant digits in the day.

A day value of 2000 and 200000 hours is first constructed into a TdIntervalDayToHour. The TdIntervalDayToHour literal representation results in a TdIntervalDayToHour value of 10,333 days and 8 hours exceeding the maximum value of '9999 23'.

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' with a calculated precision value of 1.

Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdIntervalDayToHour Structure
TdIntervalDayToHour Members
Overload List