DateAdd
Returns a local date and/or time obtained by adding the value of the interval parameter to the starting date and/or time. This function takes into account the units (defined by the datePart parameter) for the interval.
Syntax
DateAdd(datePart, interval, startingDateTime)
Enabled for
Search/Dashboard | Yes |
Business Rules | Yes |
Quick Actions | Yes |
Workflow Objects | Yes |
Reports | No |
Parameters
datePart |
The interval type. Must be surrounded by quotes (" "). The following interval types are supported:
|
interval | A numeric value that is a type of the part specified in the datePart parameter. |
startingDateTime | The starting date and time. |
Return Value
DateTime value.
If the system has to display the return value, it implicitly converts it to text, thereby allowing the display format to change depending on your culture code. See Available Languages and Cultures for a list of the culture codes used by HEAT. |
Example
$(DateAdd("day",-90,CurrentDateTime()))
The example above shows how to retrieve instances from the past 90 days in conjunction with the CurrentDateTime() function.
To obtain the result you want, use the CurrentDateTime() function with this function as shown in the following example: