Top  | Previous | Next

Date and Time / timeBetween

timeBetween(date,date,date)

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.

 

timeBetween(toDate("2003-9-14 12:00:00"), toDate("2003-9-14 8:00:00"), 

 toDate("2003-9-14 18:00:00"))

...returns true

 

timeBetween("2:00:00 pm""9:00:00 am""5:00:00 pm")

...returns true

 

timeBetween("6/10/2006 2:00:00", "06/3/06 9:00:00", "2006-06-12 5:00:00")

...returns true (Note: This example also shows the variety of date formats accepted)

 

timeBetween(toDate("2003-9-14 20:00:00"), toDate("2003-9-14 18:00:00"), 

 toDate("2003-9-15 2:00:00"))

...returns true