Date Equation Settings
Date equation fields allow you to perform calculations with dates and display results in either date format or as numeric values. These powerful fields enable you to calculate deadlines, determine timeframes, and automate date-based logic in your application.
What You'll Learn
You'll discover how to configure date equation fields, understand the different options for date types and result formats, and learn how to properly format your outputs as either dates or numeric values. This knowledge will help you create more precise date calculations, display results in the most appropriate format for your users, and avoid common configuration mistakes when working with date-based data.
Overview
Date equations can calculate dates and format results as date values or number values of seconds, hours, days, weeks, or years.
To enable date calculations, update the "Equation Type" to "Date" in the field's settings.
Basic Settings
Equation Type
This option will be either "Numeric" or "Date". For this article, we're covering Date equations.
- To learn when to use a Date or a Numeric equation field, see our related article on equation field types.
Date Type
The date type option is used to convert any number value in the equation to a time unit before being calculated. For example, if you selected "hours" and are adding "5" to a date field value, you would be adding 5 hours.
The following are the available options:
- Seconds
- Hours
- Days
- Weeks
- Years
Notes:
- As of 2026-11-26, you will no longer be able to set the Date Type to "hours" if the result of the equation has the Time Format set to "Ignore Time".
- By default, Date Equation fields that have "Ignore Time" set will have "Days" selected for the Date Type.
Result Type
A Date Equation can return a result either as a date or as a number depending on what you choose for this option.
Note: Depending on your Result Type setting, different options exist for your results. See details below.
Result Type Settings
Result Type: Number
- Decimals: Whether large numbers will be separated by commas, decimals, or nothing.
- Decimal Places: The number of decimal places to include when displaying the number. This doesn't affect how the numbers are stored in the database, only how they are displayed. If the stored number has more decimal places than this option, then the displayed number will be rounded.
- Rounding: Whether the number should be rounded up or down. If using the default setting, numbers ending in a number below 6 will round down, and anything else will round up.
- Thousands: Whether commas will separate thousands in large numbers. For example, "80000" would display as "80,000".
- Number Format: Options to format your number with currency letters or your own custom before and after the text.
Result Type: Date
-
Date Format: This determines how dates will be formatted.
Here are examples for the date of July 4th, 2013:
- mm/dd/yyyy: 07/04/2013
- M D, yyyy: July 4th, 2013
- dd/mm/yyyy: 04/07/2013
- Ignore Date: no date will be displayed
-
Time Format: This determines how times will be formatted.
Date Functions in Equation Fields
This reference explains the various date functions available in equation fields and how to implement them effectively in your application.
What You'll Learn
You'll discover the various date-related functions available for equation fields, understand how each function works with specific examples, and learn how to properly implement them in your app. This knowledge will enable you to perform sophisticated date calculations, extract specific components from dates, and create dynamic date-based logic that updates automatically within your application.
Date Functions Reference
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 | getDateDayOfWeek(07/08/2024) = 2 |
getDateDayOfMonth | Returns the numeric day of the month | 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 | getDateWeek(07/08/2024) = 28 |
getDateMonth | Returns the numeric month of the year | 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 |
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.
Updated 8 days ago