Date Equation Functions
Related Articles:
The following examples use July 8, 2024 as the date:
| Function Name | Description | Example with Result |
|---|---|---|
currentTime | Inserts the current time as a date or number value | currentTime() = 07/08/2024 |
currentDate | Inserts the current date (midnight) as a date or number value | currentDate() = 07/08/2024 |
getDateDayOfWeek | Returns the numeric day of the week (Equation field's "Equation Type" must be set to "Numeric") | getDateDayOfWeek(07/08/2024) = 2 |
getDateDayOfMonth | Returns the numeric day of the month (Equation field's "Equation Type" must be set to "Numeric") | getDateDayOfMonth(07/08/2024) = 8 |
getDateYear | Returns the numeric year of the date (Equation field's "Equation Type" must be set to "Numeric") | getDateYear(07/08/2024) = 2024 |
getDateWeek | Returns the numeric week of the year (Equation field's "Equation Type" must be set to "Numeric") | getDateWeek(07/08/2024) = 28 |
getDateMonth | Returns the numeric month of the year (Equation field's "Equation Type" must be set to "Numeric") | getDateMonth(07/08/2024) = 7 |
getDateLastDateOfMonth | Returns the last date of the month of a given date | getDateLastDateOfMonth(07/08/2024) = 07/31/2024 |
netWorkDays | Returns the number of working days between two dates | netWorkDays(07/08/2024, 08/06/2024) = 22 |
max | Returns the maximum of a list of values | max(07/08/2024, 08/06/2024) = 08/06/2024 |
mean | Returns the mean of a list of values | mean(07/08/2024, 08/06/2024) = 07/22/2024 |
median | Returns the median of a list of values | median(07/08/2024, 08/06/2024) = 07/22/2024 |
min | Returns the minimum of a list of values | min(07/08/2024, 08/06/2024) = 07/08/2024 |
randomInt | Returns a random integer between two values | randomInt(07/08/2024, 08/06/2024) = 07/20/2024 |
std | Returns the standard deviation of a list of values | std(07/08/2024, 08/06/2024) = 01/21/1970 |
var | Returns the variance of a list of values | var(07/08/2024, 08/06/2024) = 06/13/101441 |
Note: For netWorkDays function, the equation field's "Equation Type" must be set to "Numeric" in order for the calculations to work properly.
Notes:
-
The equation type must be set to "Date" to use some of these functions.
-
The results may vary based on the specific selections you make in the settings of your date equation field. The basic examples provided above aim to offer a foundational understanding of how the function operates.
-
The Date Equation field does not support multiplication within expressions. For example, formulas like
(Date) + (A * B), where A and B are numbers or number fields will not work as expected. You'll need to calculate the result ofA * Bseparately and reference that value in your date equation. -
Date Equation Fields: Matching Date/Time Settings When using a Date Equation field to calculate the hours between two or more Date/Time fields, both fields must use the same date setting. Either both fields should include the date, or both should ignore it. If one field includes the date and the other ignores it, the equation will return an incorrect value.
Updated 18 days ago
