--- 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 - Date/string **date** - The date to compare. Can be either a date or a string. - Date/string **startDate** - The start date to compare to. Can be either a date or a string. - Date/string **endDate** - The end date to compare to. Can be either a date or a string. - Results - Bool - True if the date is between the start and end date, False if 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 ```