'Usage Dim instance As TdPeriodDate 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 TdPeriodDate.
'Usage Dim instance As TdPeriodDate Dim format As String Dim value As String value = instance.ToString(format)
When a TdPeriodDate 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 period is surrounded by parentheses, and a comma is used as a delimiter between the Begin and End bounds.
The format specifier is only used when formatting the string representation of the beginning and ending bounds of the period. The same format specifiers listed in TdDate.ToString will be supported.
If the format parameter is null, the string representation of TdPeriodDate will be equivalent to the "G" format specifier which is
(yyyy-MM-dd, yyyy-MM-dd)
All period types will support the following two format specifiers:
Format Specifier | Description |
---|---|
G |
The ANSI representation of the period: (yyyy-MM-dd, yyyy-MM-dd). Example: (2008-08-14, 2008-12-15). |
L or l |
The SQL literal representation of the period: PERIOD'(yyyy-MM-dd, yyyy-MM-dd)'. Example: PERIOD'(2008-04-14, 2008-12-15)'. |
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019