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



Teradata.Client.Provider Namespace > TdIntervalMinuteToSecond Structure > TdIntervalMinuteToSecond Constructor : TdIntervalMinuteToSecond Constructor(TimeSpan,Byte,Byte)
A TimeSpan to initialize TdIntervalMinuteToSecond.
Number of significant digits of the minute.
The number of decimal places for the second.
An instance of TdIntervalMinuteToSecond is created using a TimeSpan specifying the precision and the scale as bytes.
Syntax
'Declaration
 
Public Function New( _
   ByVal timeSpan As TimeSpan, _
   ByVal precision As Byte, _
   ByVal scale As Byte _
)
'Usage
 
Dim timeSpan As TimeSpan
Dim precision As Byte
Dim scale As Byte
 
Dim instance As New TdIntervalMinuteToSecond(timeSpan, precision, scale)
public TdIntervalMinuteToSecond( 
   TimeSpan timeSpan,
   byte precision,
   byte scale
)
public:
TdIntervalMinuteToSecond( 
   TimeSpan timeSpan,
   byte precision,
   byte scale
)

Parameters

timeSpan
A TimeSpan to initialize TdIntervalMinuteToSecond.
precision
Number of significant digits of the minute.
scale
The number of decimal places for the second.
Exceptions
ExceptionDescription
The timespanparameter specifies 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 TimeSpan value is converted into a TdIntervalMinuteToSecond and evaluated against TdIntervalMinuteToSecond.MinValue and TdIntervalMinuteToSecond.MaxValue. If the values are not exceeded but the resulting minutes component exceeds the supplied parameter precision value, an exception is generated.

After conversion of the TimeSpan value into a TdIntervalMinuteToSecond, any fractional seconds will be truncated according the the supplied parameter scale.

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 TdIntervalMinuteToSecond literal representation results in a TdIntervalMinuteToSecond value of '14:20.123456'. The .1234567 seconds value will truncated by the supplied parameter scale. The supplied parameter precision must be a value greater than or equal to 2 and less than or equal to TdIntervalMinuteToSecond.MaxScale to eliminate exceptions due to truncation of the minutes component.

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

TdIntervalMinuteToSecond Structure
TdIntervalMinuteToSecond Members
Overload List