Search code examples
sharepointsharepoint-2010sharepoint-2013sharepoint-designersharepoint-workflow

Calculated Column - Add x days to created date, excluding weekends Infopath


I created a new field in the list (calculated field of type date and time), and called it as "escalate date", then using this formula.

=IF(Weekday([Modified])>3, [Modified]+5, IF(Weekday([Modified])>1,[Modified]+3, [Modified]+4))

Say a user creates a item in a list and they have 2 (working days) to mark it as completed, The above formula calculates for 3 working days, I need for 2 working days. Please help me.


Solution

  • if i understand correctly:

    a document added on monday: the due date should be set to wednesday (so tuesday and wednesday to mark as completed)

    a document added on thursday: the due date should be set to monday (so friday and tuesday to mark as completed)

    Then this is the correct formula:

    =IF(WEEKDAY([Modified])=5;[Modified]+4;IF(WEEKDAY([Modified])=6;[Modified]+4;IF(WEEKDAY([Modified])=7;[Modified]+3;IF(WEEKDAY([Modified])=1;[Modified]+2;[Modified]+2))))