Send feedback on this topic.
Teradata.Client.Provider
TdIntervalHour Constructor(TimeSpan)



Teradata.Client.Provider Namespace > TdIntervalHour Structure > TdIntervalHour Constructor : TdIntervalHour Constructor(TimeSpan)
A TimeSpan to initialize TdIntervalHour.
An instance of TdIntervalHour is created from a TimeSpan.
Syntax
'Declaration
 
Public Function New( _
   ByVal timeSpan As TimeSpan _
)
'Usage
 
Dim timeSpan As TimeSpan
 
Dim instance As New TdIntervalHour(timeSpan)
public TdIntervalHour( 
   TimeSpan timeSpan
)
public:
TdIntervalHour( 
   TimeSpan timeSpan
)

Parameters

timeSpan
A TimeSpan to initialize TdIntervalHour.
Exceptions
ExceptionDescription
The timespan parameter specifies a TdIntervalHour value less than TdIntervalHour.MinValue or greater than TdIntervalHour.MaxValue.
Remarks

The TimeSpan value is converted into a TdIntervalHour and evaluated against TdIntervalHour.MinValue and TdIntervalHour.MaxValue. The TdIntervalHour.Precision is then calculated from the number of digits contained within the interval hour component.

After conversion of the TimeSpan value into a TdIntervalHour, any minutes, seconds or microseconds will be truncated. For example, a TimeSpan value created with a TimeSpan.Ticks value of 9378401234567 results in a value of 10 days, 20 hours, 30 minutes and 40.1234567 seconds. The TdIntervalHour literal representation results in a TdIntervalHour value of '260'. The 30 minutes and the 40.1234567 seconds values are truncated. Precision is calculated to be a value of 3 representing three significant digits in the hour.

Requirements

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

See Also

Reference

TdIntervalHour Structure
TdIntervalHour Members
Overload List