Date and Time Format Strings
You can create a standard or custom date and time format string, which consists of one or more date specifiers, to define how to format date and time data using Composite Formatting of strings.
Standard Date and Time Format Strings
A standard date and time format string uses a single format specifier to define the text representation of a date and time value. Any date and time format string that contains more than one character, including white space, is interpreted as a custom date and time format string; for more information, refer to Custom Date and Time Format Strings (see below).
The following table describes the standard date and time format specifiers and displays a result string produced by each format specifier. Note that the string representations of date and time values typically vary by culture. See the Example section for EasyLanguage code samples.
Custom Date and Time Format Strings
A custom format string consists of one or more custom date and time format specifiers. Any string that is not a standard date and time format string (i.e. containing more than one character) is interpreted as a custom date and time format string.
The following table describes the custom date and time format specifiers and displays a result string produced by each format specifier. Note that the string representations of date and time values typically vary by culture. See the Example section for EasyLanguage code samples.
Example
The following shows the use of composite formatting.
Composite formatting sample print output |
- Click on the Import Example link to import the example into TradeStation.
- Go to the TradeStation platform and create a Chart window. Use the Insert - Indicator menu sequence and Add to the chart window. Select the View > EasyLanguage Print Log to see the text output.
- To review or modify the example code, go to the TS Development Environment and open indicator in the EasyLanguage Editor.