dateRange (Create date range)

The $dateRange function creates a new date range (DateRange) from startDate to endDate.

The $dateRange function creates a new date range (DateRange) from startDate to endDate.

Syntax

$dateRange(startDate,toDate)

Parameter

Name

Description

startDate

The 'from' date

Supported types are:

  • DateTime (Date with time and time zone)

  • Text (as formatted date)

  • Number (timestamp in milliseconds)

  • Timestamp (Timestamp object)

  • Time (Time object)

  • Date (native Javascript type)

endDate

The 'to' date

The same types are supported as in startDate

Return value

A new date range (DateRange) from startDate to endDate.

Example

Executed on 2019/12/03 at 01:50 p.m..

Syntax

Result

$dateRange($dateCalc(11h 30m 0s 0S),$dateCalc(+1d -1S,$today()))

2019/12/03 11:30 a.m. – 2019/12/03 12:59:59.999 p.m.