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



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

Parameters

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

The TimeSpan value is converted into a TdIntervalHourToSecond and evaluated against TdIntervalHourToSecond.MinValue and TdIntervalHourToSecond.MaxValue. The TdIntervalHourToSecond.Precision is then calculated from the number of digits contained within the interval hour component and the TdIntervalHourToSecond.Scale is calculated from the number of decimal places required to represent the fractional seconds.

After conversion of the TimeSpan value into TdIntervalHourToSecond, any fractional seconds will be truncated according the the TdIntervalHourToSecond.MaxScale value of 6 decimal places. For example, a TimeSpan value created with a TimeSpan.Ticks value of 368601234567 results in a value of 0 days, 10 hours, 14 minutes and 20.1234567 seconds. The TdIntervalHourToSecond literal representation results in a TdIntervalHourToSecond value of '10:14:20.123456'. The .1234567 seconds value is truncated by one significant digit. Precision is calculated to be a value of 2 representing two significant digits in the hour.

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

TdIntervalHourToSecond Structure
TdIntervalHourToSecond Members
Overload List