Skip to main content
Version: 7.9

dateIsBefore

This function is used by Ignition's Expression language.

Description

Compares two dates to see if date1 is before date2.

note

This is exclusive, meaning if the dates are identical the result is always False.

Syntax

dateIsBefore(date1, date2)

  • Parameters

    • Date date1 - The first date to compare.

    • Date date2 - The second date to compare.

  • Results

    • Bool - True if date1 is at or before date2, False if not.

Code Examples

Code Snippet
dateIsBefore({Root Container.Calendar.date}, toDate("2016-04-12 00:00:00"))
// Will be true if the selected date of the calendar component is before the April 12th, 2016 at midnight