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



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

Parameters

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

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

After conversion of the TimeSpan value into TdIntervalSecond, any fractional seconds will be truncated according the the TdIntervalSecond.MaxScale value of 6 decimal places. For example, a TimeSpan value created with a TimeSpan.Ticks value of 8601234567 results in a value of 0 days, 0 hours, 14 minutes and 20.1234567 seconds. The TdIntervalSecond literal representation results in a TdIntervalSecond value of '860.123456'. The .1234567 seconds value is truncated by one significant digit. Precision is calculated to be a value of 3 representing three significant digits in the second.

Requirements

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

See Also

Reference

TdIntervalSecond Structure
TdIntervalSecond Members
Overload List