Mathematical or date-time expression calculator Function for Month

Issue #504 resolved
Radley Neethling created an issue

Hi

I want to add 4 months to the current date and time but exclude the weekend for the end date. e.g.

Current date is 24/2/2017 add 4 months = 24/6/2017 which is a weekend so date should be 26/6/2017 which is the monday.

Could you help out with the Formula

Comments (2)

  1. Fidel Castro Armario repo owner

    Hi Radley,

    Use the "Set a field as a function of other fields" with the following configuration:

    • Field to be checked...: it doesn't matter what we select here because we are not going to use type 1 setting rules.
    • Target field: a Date Picker custom field.
    • Setting rules:
    [dayOfTheWeek(addMonths({00057}, 4, LOCAL), LOCAL) = {SATURDAY}]addMonths({00057}, 4, LOCAL) + 2 * {DAY}
    [dayOfTheWeek(addMonths({00057}, 4, LOCAL), LOCAL) = {SUNDAY}]addMonths({00057}, 4, LOCAL) + {DAY}
    [true]addMonths({00057}, 4, LOCAL)
    
  2. Log in to comment