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



Teradata.Client.Provider Namespace > TdPeriodTimestampWithTimeZone Structure > ToString Method : ToString(String) Method
The DateTime format string that will be used to format the TdPeriodTimestampWithTimeZone.
TdPeriodTimestampWithTimeZone is converted to the equivalent String using the specified format.
Syntax
'Declaration
 
Public Overloads Function ToString( _
   ByVal format As String _
) As String
'Usage
 
Dim instance As TdPeriodTimestampWithTimeZone
Dim format As String
Dim value As String
 
value = instance.ToString(format)
public string ToString( 
   string format
)
public:
String^ ToString( 
   String^ format
) 

Parameters

format
The DateTime format string that will be used to format the TdPeriodTimestampWithTimeZone.

Return Value

A string representation of the Period.
Remarks

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

    (Beginning Bound, Ending Bound)

The format specifier is only used when formatting the string representation of the beginning and ending bounds of the period. It will not affect the format of the period.

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.ffffffZ, yyyy-MM-dd HH:mm:ss.ffffffZ)

The following format specifiers are supported by TdPeriodTimestamp:

Format Specifier Description
G

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

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

l or L

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

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

Requirements

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

See Also

Reference

TdPeriodTimestampWithTimeZone Structure
TdPeriodTimestampWithTimeZone Members
Overload List
ToString(String) Method