--- title: "dateRange (Create date range)" slug: "calc-function-date-range" updated: 2026-05-12T13:15:14Z published: 2026-05-12T13:15:14Z canonical: "docs.lobstersoftware.com/calc-function-date-range" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # dateRange (Create date range) The $dateRange function creates a new date range (DateRange) from *startDate* to *endDate.* > [!NOTE] > The $dateRange function creates a new date range (DateRange) from *startDate* to *endDate.* > > > [!TIP] > > **Tooltip** > > > > Syntax: *$dateRange(startDate,toDate)* > > > > | Parameter | Description | > > | --- | --- | > > | `startDate` | The "from" date | > > | `endDate` | The "to" date | > > > > Returns the newly created date range (DateRange). > > > > Example: $dateRange($now(),$dateCalc(+1d)) – returns a 24 hours date range starting from "now". ## 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. |