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



Teradata.Client.Provider Namespace > TdIntervalMinuteToSecond Structure > TdIntervalMinuteToSecond Constructor : TdIntervalMinuteToSecond Constructor(Int32,Int32,Int32,Byte,Byte)
Number of minutes.
Number of seconds.
The fractional number of seconds.
Number of significant digits of the minute.
The number of decimal places for the second.
An instance of TdIntervalMinuteToSecond is created from time components specified as integers while precision and scale components are specified as bytes.
Syntax
'Declaration
 
Public Function New( _
   ByVal minutes As Integer, _
   ByVal seconds As Integer, _
   ByVal microseconds As Integer, _
   ByVal precision As Byte, _
   ByVal scale As Byte _
)
'Usage
 
Dim minutes As Integer
Dim seconds As Integer
Dim microseconds As Integer
Dim precision As Byte
Dim scale As Byte
 
Dim instance As New TdIntervalMinuteToSecond(minutes, seconds, microseconds, precision, scale)
public TdIntervalMinuteToSecond( 
   int minutes,
   int seconds,
   int microseconds,
   byte precision,
   byte scale
)
public:
TdIntervalMinuteToSecond( 
   int minutes,
   int seconds,
   int microseconds,
   byte precision,
   byte scale
)

Parameters

minutes
Number of minutes.
seconds
Number of seconds.
microseconds
The fractional number of seconds.
precision
Number of significant digits of the minute.
scale
The number of decimal places for the second.
Exceptions
ExceptionDescription
The parameters specify a TdIntervalMinuteToSecond value less than TdIntervalMinuteToSecond.MinValue or greater than TdIntervalMinuteToSecond.MaxValue.
The precision or scale parameters are outside the minimum or maximum range of values.
The precision parameter is not large enough to represent the number of minutes.
Remarks

The number of minutes, seconds and microseconds are converted into a TdIntervalMinuteToSecond. 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 supplied scale is used to used to truncate any fractional seconds at the position indicated by the scale.

For example, a microseconds value of 12345678 and a scale of 6 will be divided by 10^-6 and truncated at the 6th position resulting in a value of .123456. A microseconds value of 123 and a scale of 6 will result in a value of .000123.

All values are converted into a TdIntervalMinuteToSecond to determine if the TdIntervalMinuteToSecond.MinValue or the TdIntervalMinuteToSecond.MaxValue values are exceeded. If the values are not exceeded but the resulting minutes component exceeds the supplied precision value, an exception is generated.

For example a constructor for TdIntervalMinuteToSecond(444, 6001, 90, 2, 6) requests 444 minutes, 2 seconds, 90 microseconds with a precision of 2 and a scale of 6. The resulting TdIntervalMinuteToSecond literal value of '544:01.000090' contains a minutes value which cannot be represented in 2 digits. Therefore an exception is generated, even though the MinValue and the MaxValue values have not been exceeded.

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 TdIntervalMinuteToSecond. For instance, a minute value of 20, a second value of -4900, a microsecond value of 30, a second precision of 4 and a scale of 6 will result in a TdIntervalMinuteToSecond interval value of -'61:40.000030'.

Requirements

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

See Also

Reference

TdIntervalMinuteToSecond Structure
TdIntervalMinuteToSecond Members
Overload List