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



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

Parameters

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

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

For example, 28 hours and 75 minutes is first constructed into a TdIntervalHourToMinute. The TdIntervalHourToMinute literal representation results in a TdIntervalHourToMinute value of 29 hours and 15 minutes 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 2 representing two significant digits in the hour.

An hour value of 7000 and 200000 minutes is first converted into a TdIntervalHourToMinute. The TdIntervalHourToMinute literal representation results in a TdIntervalHourToMinute value of 10,333 hours and 20 minutes exceeding the maximum value of '9999 59'.

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 TdIntervalHourToMinute. For instance, an hour value of 20 and a minute value of -4900 will result in a TdIntervalHourToMinute interval value of -'61:40' with a calculated precision value of 2.

Requirements

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

See Also

Reference

TdIntervalHourToMinute Structure
TdIntervalHourToMinute Members
Overload List