Choosing the Right Equation Type: Numeric vs. Date
Learn when to use a date or numeric equation field in this article.
Overview
When setting up an equation field, you must select an equation type: Numeric or Date. Your choice depends on what you want the result of the equation to be—either a number or a date.
When to Use Numeric
Select the "Numeric" option if your final output needs to be a number. This includes:
- Extracting Numeric Components from Dates: For example, extracting the year (e.g., "2024") out of a full date like "01/01/2024":
/Choosing%20the%20Right%20Equation%20Type%20Numeric%20vs.%20Date/getDateyear.png?width=575&height=753&name=getDateyear.png)
- Calculations that will return number values: Such as the number of adding two or more numeric fields together (e.g.,
{Starting Inventory}+{Inventory Received}-{InventoryShipped}):/Choosing%20the%20Right%20Equation%20Type%20Numeric%20vs.%20Date/examplenumericequation.png?width=595&height=739&name=examplenumericequation.png)
When to Use Date
Select the "Date" option if your final output should be another date. This often involves:
- Date Arithmetic: Adding or subtracting days, weeks, or months from a given date. For example, calculating 30 days after an order date for a due date:
/Choosing%20the%20Right%20Equation%20Type%20Numeric%20vs.%20Date/duedate.png?width=568&height=852&name=duedate.png)
- Shifting Dates in Time: Adding years to a date field to have the equation return the date in the future (e.g.,
{Date} + 7):/Choosing%20the%20Right%20Equation%20Type%20Numeric%20vs.%20Date/dateequationexample.png?width=575&height=862&name=dateequationexample.png)
Quick Reference:
- Numeric Equation Type: Use if your result is a number (e.g., year of a date, difference between two dates in days).
- Date Equation Type: Use if your result is another date (e.g., current date plus 30 days).