Navigation: Realtest Script Language >

Date Constants

 

 

 

 

Date constants can be formatted in any of the following ways:

mm/dd/yy (or dd/mm/yy if that setting is specified)

mm/dd/yyyy (or dd/mm/yyyy ditto)

either of the above with dots (.) in place of slashes (/)

yyyy-mm-dd

yyyy.mm.dd

yyyymmdd

dd-mmm-yy (where mmm is the first three letters of the month name)

dd-mmm-yyyy (ditto)

Earliest (use the earliest available date as a StartDate)

Latest (use the latest available date as an EndDate)

Date constants are used in the Import and Settings script sections.

When using a date in a formula, e.g. if(Date = 20200607), it is simply a number and must therefore be formatted as YYYYMMDD.

If you prefer, you can use ToDate to convert date strings in any of the above formats (except Earliest and Latest) to numbers.

Any type of CSV files that RealTest reads can use any of the above formats (other than "Earliest" and "Latest") in their Date column values.

To override the current date format setting (M/D/Y vs. D/M/Y) in a CSV import, add a CSVDateFmt definition.

To override the current date format setting a strategy's imported TradeList, add a TLDateFmt definition.

 

 

 

Copyright © 2020-2024 Systematic Solutions, LLC