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



Teradata.Client.Provider Namespace > TdIntervalHourToMinute Structure > TdIntervalHourToMinute Constructor : TdIntervalHourToMinute Constructor(TimeSpan,Byte)
A TimeSpan to initialize TdIntervalHourToMinute.
Number of significant digits of the hour.
Construct an instance of TdIntervalHourToMinute using a TimeSpan and specifying the hour precision as a byte.
Syntax
'Declaration
 
Public Function New( _
   ByVal timeSpan As TimeSpan, _
   ByVal precision As Byte _
)
'Usage
 
Dim timeSpan As TimeSpan
Dim precision As Byte
 
Dim instance As New TdIntervalHourToMinute(timeSpan, precision)
public TdIntervalHourToMinute( 
   TimeSpan timeSpan,
   byte precision
)
public:
TdIntervalHourToMinute( 
   TimeSpan timeSpan,
   byte precision
)

Parameters

timeSpan
A TimeSpan to initialize TdIntervalHourToMinute.
precision
Number of significant digits of the hour.
Exceptions
ExceptionDescription
The timespan parameter specifies 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 TimeSpan value is converted into a TdIntervalHourToMinute and evaluated against TdIntervalHourToMinute.MinValue and TdIntervalHourToMinute.MaxValue. If the values are not exceeded but the resulting hours component exceeds the supplied parameter precision value, an exception is generated.

After conversion of the TimeSpan value into a TdIntervalHourToMinute, any seconds or microseconds will be truncated. For example, a TimeSpan value created with a TimeSpan.Ticks value of 60201234567 results in a value of 0 days, 1 hours, 40 minutes and 20.1234567 seconds. The TdIntervalHourToMinute literal representation results in a TdIntervalHourToMinute value of '1:40'. The 20.1234567 seconds value is truncated.

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