Navigation: Realtest Script Language > Syntax Element Details > Days Category General-Purpose Functions Description Counts the number of calendar or market days from one date to another Syntax Days(date1, date2, market {false}) Parameters date1 - formula returning a date date2 - formula returning a date market - optionally counts market days rather than the default calendar days Notes The parameters can be date constants in YYYYMMDD format, or any function that returns a date, e.g. BarDate or ToDate or InfoExpiry. One use of this function is to convert a bar count to a date count, e.g. Days(BarDate[20], BarDate). If you need the know the bar (market day) count between two dates, pass TRUE as the optional third argument. Copyright © 2020-2025 Systematic Solutions, LLC