+ Start a Discussion
KALYANI GURRAMKALYANI GURRAM 

Formula field to show date

Hi,
I need to create a date field and show Earliest is 5 business days in the future.
Please help me to achieve this.

Thank you,
 
AbhinavAbhinav (Salesforce Developers) 
Hi Kalyani,

Could you please help with example what you want to achieve?
As per my understanding your formula field return type should be date and what value you want to be reflected in that field?

Thanks!
Andrew GAndrew G
Here is a reference
Sample Date Formulas | Examples of Advanced Formula Fields | Salesforce Developers (https://developer.salesforce.com/docs/atlas.en-us.usefulFormulaFields.meta/usefulFormulaFields/formula_examples_dates.htm)

Example:
This formula finds three business days from a given date.
CASE( 
  MOD( date - DATE( 1900, 1, 7 ), 7 ),
  3, date + 2 + 3,
  4, date + 2 + 3,
  5, date + 2 + 3,
  6, date + 1 + 3,
  date + 3
)
I would update it to use the WEEKDAY()
CASE( 
  WEEKDAY( date ),
  1, date + 0 + 5,
  7, date + 6,
  date + 7
)
Basicaly,
if 1 (Sunday) add 5 days which should be Friday
if 7 (Saturday) add 6 days which should be Friday (1 day for the Sunday and then 5)
else add 7 (which is 2 days for the weekend and 5 working days)

Note, the above does not factor in public holidays.

Adapt as required

regards
Andrew​​​​​​​
huihiu gyutuyhuihiu gyutuy
If you are facing this issue I will suggest you to learn how to make this formula visit here (https://bright-star.com.au/) and try this trick.
Russ KulasRuss Kulas
Hi There,
     I have a website about Tracking i want add more tracking service in my website can you pleace help me about that you can visit (https://trackscourier.com/) my website ..
shakir fatehshakir fateh
You should visit here to learn how to make this formula https://protrackinghub.com/vrl-tracking/ ..... 
best regards
shakir fatehshakir fateh
You should visit here to learn how to make this formula https://protrackinghub.com/vrl-tracking/ ..... 
best regards