Send feedback on this topic.
Teradata.Client.Provider
ToString(String,IFormatProvider) Method



Teradata.Client.Provider Namespace > TdPeriodTimestamp Structure > ToString Method : ToString(String,IFormatProvider) Method
The DateTime format string that will be used to format the TdPeriodTimestamp.
The culture specific information. The culture specific information is not used when converting a Period into a string.
TdPeriodTimestamp is converted into the equivalent String representation using the specified format. Culture information is not used when converting a period to a string.
Syntax
'Declaration
 
Public Overloads Function ToString( _
   ByVal format As String, _
   ByVal formatProvider As IFormatProvider _
) As String
'Usage
 
Dim instance As TdPeriodTimestamp
Dim format As String
Dim formatProvider As IFormatProvider
Dim value As String
 
value = instance.ToString(format, formatProvider)
public string ToString( 
   string format,
   IFormatProvider formatProvider
)
public:
String^ ToString( 
   String^ format,
   IFormatProvider^ formatProvider
) 

Parameters

format
The DateTime format string that will be used to format the TdPeriodTimestamp.
formatProvider
The culture specific information. The culture specific information is not used when converting a Period into a string.

Return Value

A string representation of the period contained in TdPeriodTimestamp.
Remarks

When a TdPeriodTimestamp is converted to a string, both the beginning and ending bound will be included in the returning string. The format of the string will be:

    (Beginning Bound, Ending Bound)    

The format specifier affects the string representation of the beginning and ending bounds of the period. Cultural information specified in the formatProvider is ignored.

If the format parameter is null, the string representation of TdPeriodTimestamp will be equivalent to the "G" format specifier which is

    (yyyy-MM-dd HH:mm:ss.ffffff, yyyy-MM-dd HH:mm:ss.ffffff)

The following format specifiers are supported by TdPeriodTimestamp:

Format Specifier Description
G

The ANSI representation of the period: (yyyy-MM-dd HH:mm:ss.ffffff, yyyy-MM-dd HH:mm:ss.ffffff).

Example: (2008-08-14 10:21:31.002, 2008-12-15 12:45:00.212).

l or L

The SQL literal representation of the period: PERIOD'(yyyy-MM-dd HH:mm:ss.ffffff, yyyy-MM-dd HH:mm:ss.ffffff)'.

Example: PERIOD'(2008-04-14 10:21:31.002, 2008-12-15 12:45:00.212)'.

Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdPeriodTimestamp Structure
TdPeriodTimestamp Members
Overload List
ToString(String,IFormatProvider) Method
ToString(String) Method