'Usage Dim instance As TdTimestampWithTimeZone Dim format As String Dim value As String value = instance.ToString(format)
Parameters
- format
- The DateTime format string that will be used to format the TdTimestampWithTimeZone.
'Usage Dim instance As TdTimestampWithTimeZone Dim format As String Dim value As String value = instance.ToString(format)
Exception | Description |
---|---|
System.FormatException | The specified format specifier is not supported. |
If the format parameter is null, the format of the string representation of the timestamp will be "yyyy-MM-dd HH:mm:ss.ffffff<+/->hh:mm".
The format specifiers that will be supported are as follows:
Format Specifier | Description |
---|---|
d | The short date pattern. "MM/dd/yyyy". UTC Offset is ignored. |
D | The long date pattern. "dddd, dd MMMM". UTC Offset is ignored. |
f | The long date and short time patterns. UTC Offset is ignored. |
F | The long date and long time patterns. TC Offset is ignored. |
g | The short date and short time patterns. UTC Offset is ignored. |
G |
The ANSI representation of the timestamp. "yyyy-MM-dd HH:mm:ss.ffffff<+/->mm:hh". The number of digits in the fractional seconds will depend upon the Scale of the timestamp. The date and time separators are not affected by the cultural settings. The number of digits that will appear in the sub-seconds is dependent on the TdTimestampWithTimeZone.Scale. For example, if the Scale is set to 4, four digits will appear in the sub-seconds. |
G |
The ANSI representation of the timestamp with TimeZone. "yyyy-MM-dd HH:mm:ss.ffffffZ". The number of digits in the fractional seconds will depend upon the Scale of the timestamp. Cultural information is ignored in this conversion. The number of digits that will appear in the fractional seconds is dependent on the TdTimestampWithTimeZone.Scale. For example, if the Scale is set to 4, four digits will appear in the fraction. |
l or L | The Teradata literal representation of Timestamp With Time Zone. |
m or M | The month and day patterns --"MMMM dd". UTC Offset is ignored. |
r or R | Converts the TdTimestampWithTimeZone to a string with the format "ddd, dd MMM yyyy HH:mm:ss GMT". Example: Tue, 30 Oct 2007 18:30:20 GMT |
s | The sortable time pattern --"yyyy'-'MM'-'dd'T'HH':'mm':'ss". The UTC offset is ignored. |
t | The short time pattern --"h:mm tt". UTC Offset is ignored. |
T | The long time patterm --"h:mm:ss tt". UTC Offset is ignored. |
u | Converts the TdTimestampWithTimeZone to a string with the format "yyyy-MM-dd HH:mm:ssZ". Example: 2007-10-30 18:30:20Z |
y or Y | The year and month pattern --"h:MMMM, yyyy". UTC Offset is ignored. |
If this instance is TdTimestampWithTimeZone.Null, a string that contains "Null" will be returned.
For additional information about the supported format specifiers refer to Globalization.DateTimeFormatInfo in the MSDN documentation.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019