Skip to main content
Version: 8.1

dateIsBefore

This function is used by Ignition's Expression language.

Description​

Compares two dates to see if date1 is before date2. This is exclusive, meaning if the dates are identical the result is always false.

Syntax​

dateIsBefore(date1, date2)

Parameters​

TypeParameterDescription
Datedate1The first date to compare.
Datedate2The second date to compare.

Returns​

Boolean - Returns true if date1 is before date2. Returns false if date1 is the same as or after date2.

Examples​

Code Snippet
dateIsBefore(now(), toDate("2016-04-12 00:00:00"))
// Will be true if the current time is before April 12th, 2016 at midnight.