DATETIME_IS_BEFORE
Check if a datetime is before another

Description

Returns true if the first datetime is before the second datetime, otherwise returns false.

Function signature

1
DATETIME_IS_BEFORE(date1: String, date2: String, precision: String) => Boolean
Copied!
Parameter
Description
Date 1
First date
Date 2
Second date
Precision
Optional precision for the comparison, one of year, month, week, isoWeek, day, hour, minute or second

Examples

Formula
Return value
DATETIME_IS_BEFORE("2011-10-10T12:13:14Z", "2011-10-09T12:13:14Z")
false
DATETIME_IS_BEFORE("2011-10-09T12:13:14Z", "2011-10-10T12:13:14Z")
true
DATETIME_IS_BEFORE("2011-10-10T12:13:14Z", "2011-10-10T12:13:14Z")
false
DATETIME_IS_BEFORE("2012-10-10T12:13:14Z", "2011-10-09T12:13:14Z", "year")
false
Export as PDF
Copy link