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



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

Parameters

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

The number of hours, minutes, seconds and microseconds are constructed into a TdIntervalHourToSecond and evaluated against TdIntervalHourToSecond.MinValue and TdIntervalHourToSecond.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 TdIntervalHourToSecond.Scale is then calculated from the number of fractional seconds required. The TdIntervalHourToSecond.Precision is calculated from the number of digits contained within the interval hour component.

For example 100 hours, 75 minutes, 300 seconds and 455666 microseconds is first converted into a TdIntervalHourToSecond and evaluated against MinValue and MaxValue. The TdIntervalMinuteToSecond literal representation results in a TdIntervalMinuteToSecond value of '101:20:00.455666'. Precision is calculated to be a value of 3 representing three significant digits of 101 hours. The scale is calculated to be 6 from the number of decimal places right of the seconds interval which equals the TdIntervalHourToSecond.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 TdIntervalHourToSecond. For instance, an hour value of 20, a minutes value of -4900, a seconds value of 30, and a microsecond value of 123456 will result in a TdIntervalHourToSecond interval value of -'61:40:30.123456' with a calculated precision of 2 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

TdIntervalHourToSecond Structure
TdIntervalHourToSecond Members
Overload List