The following functions can be used to perform operations on dates, times and datetimes.
Function | Description | Arguments | Example |
---|---|---|---|
addToDateTime
|
Adds an amount of time to a datetime. |
|
Expression: addToDateTime("M", -1,
"2021-03-21T10:19:26.214+02:00")
Result: |
extractFromDateTime
|
Extracts part of a datetime or date. If the first argument is a date, it is first converted to a datetime with the time set to noon in the local time zone. |
|
Expression: extractFromDateTime("2021-03-21T10:19:26.214+02:00", "Time")
Result: |
getCurrentDateTime
|
Returns the current datetime. | None | Expression: getCurrentDateTime()
Possible result: |
parseDateTime
|
Creates a datetime from a string. |
|
Expression: parseDateTime("2021-04-21T11:05:18.337+02:00",
"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ")
Result: |
isToday
|
Returns true if the input date or datetime
corresponds to the current date. |
Input date or datetime. | Expression: isToday(getCurrentDateTime())
Result: |
isTomorrow
|
Returns true if the input date or datetime
corresponds to the next day. |
Input date or datetime. | Expression: isTomorrow(addToDateTime("d", 1,
getCurrentDateTime()))
Result: |
isYesterday
|
Returns true if the input date or
datetime corresponds to the previous day. |
Input date or datetime. | Expression: isYesterday(addToDateTime("d", -1,
getCurrentDateTime()))
Result: |