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



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

Parameters

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

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

For example a constructor for TdIntervalHourToMinute(444, 4, 2) requests 444 hours and 4 hours with a precision of 2. The resulting hours 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 TdIntervalHourToMinute. For instance, an hour value of 20 and a minute value of -4900 will result in a TdIntervalHourToMinute interval value of -'61:40'.

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

TdIntervalHourToMinute Structure
TdIntervalHourToMinute Members
Overload List