DateValue() API for Column Conditions
Use the DateValue() API for column conditions that you want to set up for a color. It enables you to specify, calculate, or compare dates that result to the date or dates you want to highlight on a table. For more information, see Setting Up Table Row Colors.
Parameters
-
Date string {string} [required] – Date you want to specify or use to calculate or compare with another date. You can enter 0 to set the current date in your condition. For dynamic values, you can use the column keyword to reference a table column.
Sample values: 8/8/2024, 28/8/2024, 0, column.poDate
-
Date format {string} [optional] – Format of the dates you want to highlight on the table. If not specified, the Date Format preference for your account is followed. Otherwise, the default format, MM/DD/YYYY, is applied. For possible date formats, see Date Formats.
The format you provide must match the format of your date string value. If not, the condition automatically evaluates to false.
-
Add-on {string} [optional] – Variable for calculation based on the date string value. You can include a plus or minus sign and any of these keywords: m (month), d (day), y (year).
Sample values for addition: +1y2m, 2m5d
Sample values for subtraction: -12d
Examples of column conditions using the DateValue() API:
-
DateValue(“9/28/2024”,”M/D/YYYY”, “1y2m”)
This condition results to 11/28/2025 by adding 1 year and 2 months to the specified date.
-
DateValue({{column.poDate}}) > DateValue(“8/8/2024”) && DateValue({{column.poDate}}) < DateValue(“8/8/2024”,”+4d”)
This condition results to purchase order dates on or between 8/9/2024 and 8/11/2024.
-
DateValue ({{column.poDate}}) == DateValue (“8/8/2024”,”+2d”)
This condition results to a purchase order date equal to 8/10/2024.