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



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

Parameters

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

The number of hours is converted into a TdIntervalHour and validated to determine if the TdIntervalHour.MinValue or the TdIntervalHour.MaxValue values have been 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 TdIntervalHour(444, 2) requests 444 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.

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

TdIntervalHour Structure
TdIntervalHour Members
Overload List