'Usage Dim instance As TdPeriodTime 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 TdPeriodTime.
'Usage Dim instance As TdPeriodTime Dim format As String Dim value As String value = instance.ToString(format)
When a TdPeriodTime 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 and the cultural information only affects the string representation of the beginning and ending bounds of the period. Neither parameter affects the format of the parameter. That is, the delimiter (comma) used to separate the beginning and ending bounds, and the parentheses cannot be changed.
If the format parameter is null, the string representation of TdPeriodTime will be equivalent to the "G" format specifier which is
(HH:mm:ss.ffffff, HH:mm:ss.ffffff)
The following format specifiers are supported by TdPeriodTime:
Format Specifier | Description |
---|---|
G |
The ANSI representation of the period: (HH:mm:ss.ffffff, HH:mm:ss.ffffff). Example: (10:21:31.002, 12:45:00.212). |
l or L |
The SQL literal representation of the period: PERIOD'(HH:mm:ss.ffffff, HH:mm:ss.ffffff)'. Example: PERIOD'(10:21:31.002, 12:45:00.212)'. |
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019