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



Teradata.Client.Provider Namespace > TdIntervalDayToSecond Structure > TdIntervalDayToSecond Constructor : TdIntervalDayToSecond Constructor(Int32,Int32,Int32,Int32,Int32)
Number of days.
Number of hours.
Number of minutes.
Number of seconds.
The number of fractional seconds.
An instance of TdIntervalDayToSecond is created from a day and time components specified as integers.
Syntax
'Declaration
 
Public Function New( _
   ByVal days As Integer, _
   ByVal hours As Integer, _
   ByVal minutes As Integer, _
   ByVal seconds As Integer, _
   ByVal microseconds As Integer _
)
'Usage
 
Dim days As Integer
Dim hours As Integer
Dim minutes As Integer
Dim seconds As Integer
Dim microseconds As Integer
 
Dim instance As New TdIntervalDayToSecond(days, hours, minutes, seconds, microseconds)
public TdIntervalDayToSecond( 
   int days,
   int hours,
   int minutes,
   int seconds,
   int microseconds
)
public:
TdIntervalDayToSecond( 
   int days,
   int hours,
   int minutes,
   int seconds,
   int microseconds
)

Parameters

days
Number of days.
hours
Number of hours.
minutes
Number of minutes.
seconds
Number of seconds.
microseconds
The number of fractional seconds.
Exceptions
ExceptionDescription
The parameters specify a TdIntervalDayToSecond value less than TdIntervalDayToSecond.MinValue or greater than TdIntervalDayToSecond.MaxValue.
Remarks

The number of days, hours, minutes, seconds and microseconds are constructed into a TdIntervalDayToSecond and evaluated against TdIntervalDayToSecond.MinValue and TdIntervalDayToSecond.MaxValue. The microseconds parameter represents 10 ^-6 seconds and the microsecond parameter is divided by 10^-6 (.000001) to create a fractional number of seconds. The TdIntervalDayToSecond.Scale is then calculated from the number of fractional seconds required. The TdIntervalDayToSecond.Precision is calculated from the number of digits contained within the interval day component.

For example, 99 days, 28 hours, 75 minutes, 300 seconds and 455666 microseconds is first constructed into TdIntervalDayToSecond and evaluated against MinValue and MaxValue. The TdIntervalDayToSecond literal representation results in a TdIntervalDayToSecond value of '100 5:20:00.455666'. Precision is calculated to be a value of 3 representing 3 significant digits of 100 days. The scale is calculated to be 6 from the number of decimal places right of the seconds interval which equals the TdIntervalDayToSecond.MaxScale value.

Negative constructor parameters may be supplied to represent negative durations of time. Mixed positive and negative constructor parameters are added together that result in a negative or positive TdIntervalDayToSecond. For instance, a day value of 200, an hour value of -4900, a minute value of 30, a second value of 400 and 1,200,510 microseconds will result in a TdIntervalDayToSecond interval value of -'4 03:23:18.799490' with a calculated precision value of 1 and a calculated scale of 6.

Requirements

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

See Also

Reference

TdIntervalDayToSecond Structure
TdIntervalDayToSecond Members
Overload List