date()

The date() function provides the ability to build a date and returns a date value formatted mm/dd/yyyy (e.g., 03/31/2021).

Syntax

date(year, month, day)

Argument Description
year

(required)

An expression that results in a numeric value (i.e., a hard-coded number, a reference to a numeric attribute, or an expression that returns a numeric value) not greater than 4 digits in length.
month

(required)

An expression that results in a numeric value (i.e., a hard-coded number, a reference to a numeric attribute, or an expression that returns a numeric value) between 1 and 12.
day

(required)

An expression that results in a numeric value (i.e., a hard-coded number, a reference to a numeric attribute, or an expression that returns a numeric value) greater than 0 and less than the number of days in the month defined by the month argument.

E.g., if the month argument resolves to 1 (January), the maximum number for the day argument is 31. If the month argument resolves to 11 (November), the maximum number for the day argument is 30.

Where Available

Available in all places the expression or injected expression icon is visible, as well as within Filter fields on Cards, Tables and List/View sections.

Examples

Where Example(s)
Business rules: Set Value

Attribute Expression

 

date(Year__c, Month__c, Day__c)

addDays(date(Year__c, Month__c, Day__c),10)

date(value(formatDate(Event_Date__c, "y")), 10,  31)

Field Editability expression

Tab Visibility expression

Business rules: Condition

addDays(date(Year__c, Month__c, Day__c), 10) > Program_Start_Date__c

date(value(formatDate(Event_Date__c, "y")), 10, 31) = "2023-10-31"

Business Rules: Notification Subject

Business Rules: Notification Body

Dynamic Filter

{!date(Year__c, Month__c,Day__c)}

{!addDays(date(Year__c, Month__c, Day__c),10)}

 

Embedded Section URL attribute

Business rules: URL Call

External View URL on List/View

{!if(addDays(date(Year__c, Month__c, Day__c), 10) > Program_Start_Date__c, URL1__c, URL2__c)}
Metric expression betweenDates(CAPEX__m, date(value(formatDate(Stage_3_Date__c, "y")), value(formatDate(Stage_3_Date__c, "MM")),  1), Stage_4_Date__c)

 

Updated on September 26, 2024

Related Articles