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



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

Parameters

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

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

After conversion of the TimeSpan value into TdIntervalDayToSecond, any fractional seconds will be truncated according the the TdIntervalDayToSecond.MaxScale value of 6 decimal places. For example, a TimeSpan value created with a TimeSpan.Ticks value of 8726341234567 results in a value of 10 days, 2 hours, 23 minutes, and 54.1234567 seconds. The TdIntervalDayToSecond literal representation results in a TdIntervalDayToSecond value of '10 02:23.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 day.

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

TdIntervalDayToSecond Structure
TdIntervalDayToSecond Members
Overload List