DateAddCalendarFixedPeriod Function
DateAddCalendarFixedPeriod (dateTime as DateTime, period as String, numberOfUnits as Numeric) as DateTime
Category: | Date |
Description: | Returns a Date value, where the Date parameter is the original date, period is a frame of time that can be either "d", "w", "m", "q", "y", and units indicates the number for the duration, such as 3 months from today. This function does not take into account non-working days or calendar exceptions. |
Supported Context: | FormulaField And BusinessRules |
Parameters: | |
dateTime as DateTime | Represents the original date as a date or reference to a field that will return a date value |
period as String | Represents the frame of time that can be either "d", "w", "m", "q", or "y" corresponding to day, week, month, quarter, or year. This will be used along with the "numberOfUnits" parameter to add the desired value to the original date specified in the "dateTime" parameter |
numberOfUnits as Numeric | Represents the number of units that you would like to add to the "dateTime" parameter, must be of type number or reference to a field that will return a numeric value. This will be used along with the "period" parameter to add the desired value to the original date specified in the "dateTime" parameter |
Returned value as DateTime | Returns a date value equal to the original date specified in the "dateTime" parameter plus the "numberOfUnits"+"period" parameters |
Example #1 |
Create a Custom Action that will shift the start date of a project by "x" amount of weeks, where "x" is defined by the end user upon the running of the custom action. First create a User Input variable of type Duration in the custom action called "moveby" Then select the "Reschedule Action" and select "start date". Within the formula enter the following: DateAddCalendarFixedPeriod($StartDate,"w",moveby) |
Note | This function does not take into account non-working days or calendar exceptions |