Send feedback on this topic.
Teradata.Client.Provider
Parse(String) Method



Teradata.Client.Provider Namespace > TdIntervalHour Structure : Parse(String) Method
A string to be converted into a TdIntervalHour.
The specified string is converted into an equivalent TdIntervalHour.
The specified string is converted into an equivalent TdIntervalHour interval.
Syntax
'Declaration
 
Public Shared Function Parse( _
   ByVal value As String _
) As TdIntervalHour
'Usage
 
Dim value As String
Dim value As TdIntervalHour
 
value = TdIntervalHour.Parse(value)
public static TdIntervalHour Parse( 
   string value
)
public:
static TdIntervalHour Parse( 
   String^ value
) 

Parameters

value
A string to be converted into a TdIntervalHour.

Return Value

A TdIntervalHour is returned that is equivalent to the TdIntervalHour contained in the input string.
Exceptions
ExceptionDescription
value cannot be converted into a TdIntervalHour interval.
value is a null reference.
The resultant operation returns a value greater than the TdIntervalHour.MaxValue or less than the TdIntervalHour.MinValue.
Remarks

This method supports the following string formats:

String Format Description
General interval format.

[sign][hours]

SQL literal format. This string may be used in a SQL statement.

INTERVAL [sign]'[hours]' HOUR

Below is the description of each format item.

Format Item Description
sign If negative a minus sign will be displayed.
hours The number of hours (one to four digits in length).

While parsing the value the TdIntervalHour.Precision will be set to the number of digits contained within the hour component.

For example a value of "100" will contain a precision of 3.

Requirements

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

See Also

Reference

TdIntervalHour Structure
TdIntervalHour Members