--- title: "timeBetween" description: "Checks to see if the given time is between the start and end times." --- # timeBetween > Checks to see if the given time is between the start and end times. **This function is used by Ignition's Expression language.** ## Description Checks to see if the given time is between the start and end times. The given times are expected as strings, and may include dates. :::note Dates will be parsed according to the default system culture. ::: ## Syntax `timeBetween(date, startDate, endDate)` ### Parameters | Type | Parameter | Description | |--------------|-------------|--------------------------------------------------------------------------| | Date/String | `date` | The date or time to compare. Can be a Date object or a string. | | Date/String | `startDate` | The start date or time. Can be a Date object or a string. | | Date/String | `endDate` | The end date or time. Can be a Date object or a string. | ### Returns **Boolean** - Returns true if the given date or time is between the startDate and endDate, or false if it is not. ## Examples ```python title="Code Snippet" timeBetween(toDate("2003-9-14 12:00:00"), toDate("2003-9-14 8:00:00"),toDate("2003-9-14 18:00:00")) //Returns true. ``` ```python title="Code Snippet" timeBetween("2:00:00 pm", "9:00:00 am", "5:00:00 pm") //Returns true. ``` ```python title="Code Snippet" timeBetween(toDate("2003-9-14 20:00:00"), toDate("2003-9-14 18:00:00"), toDate("2003-9-15 2:00:00")) //Returns true. ```