0

I need to create a formula that shows specifically 2 business days from the flow current date/time.

The formula I currently have is only for 2 days and I am not sure about how to specify 2 business days. This Formula is being used in Flow to auto populate a Target Date field on case that is then used to show an escalation flag warning field. It is required to sit in Flow and not be a Formula field.

Current Formula

{!$Flow.CurrentDateTime} + 2

Please advise how I can specifically show 2 business days, not just 2 days.

I tried this formula

CASE( 
  MOD({!$Flow.CurrentDateTime} - DATE( 1900, 1, 7 ), 7 ),
  3, {!$Flow.CurrentDateTime} + 2 + 3,
  4, {!$Flow.CurrentDateTime} + 2 + 3,
  5, {!$Flow.CurrentDateTime} + 2 + 3,
  6, {!$Flow.CurrentDateTime} + 1 + 3,
  {!$Flow.CurrentDateTime} + 3
)

And got this error enter image description here

Thank you!

2
  • Does this answer your question? Date Formula to Calculate date excluding weekends
    – identigral
    Commented Aug 4, 2022 at 22:09
  • 1
    Please edit your question to add what you have tried beyond the existing basic 2-day formula. If you haven't yet tried anything, give a serious try or two. If that doesn't work, come back & share what you tried & how it is not working (e.g., exact error text). This site exists to help, not do the work. (From the What topics can I ask about here? section of Help Center: "We’re not a place to exchange code or find implementation services.") Please read more of Help Center & take the Tour.
    – Moonpie
    Commented Aug 4, 2022 at 22:38

1 Answer 1

1

I believe I have the solution

CASE( MOD( DATEVALUE({!$Flow.CurrentDateTime}) - DATE( 1900, 1, 7 ), 7 ),
  0, {!$Flow.CurrentDateTime} + 1 + 2, /* Sun: {!$Flow.CurrentDateTime} + 1 wknd day + 2 days */
  4, {!$Flow.CurrentDateTime} + 2 + 2, /* Thurs: {!$Flow.CurrentDateTime} + 2 wknd days + 2 days */
  5, {!$Flow.CurrentDateTime} + 2 + 2, /* Fri: {!$Flow.CurrentDateTime} + 2 wknd days + 2 days */
  6, {!$Flow.CurrentDateTime} + 2 + 2, /* Sat: {!$Flow.CurrentDateTime} + 2 wknd days + 2 days */
  {!$Flow.CurrentDateTime} + 2 /* Default (Mon/Tue/Wed): {!$Flow.CurrentDateTime} + 2 days */
)
1
  • It is perfectly acceptable (actually encouraged) on SFSE that if you found the solution and added it as an answer to your own question, to accept your own answer as the correct or best answer. It helps tidy up the site as well as making it more obvious to future readers.
    – Moonpie
    Commented Oct 3, 2022 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .