Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
KALYANI GURRAM

# Formula field to show date

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

Thank you,

Abhinav (Salesforce Developers)
Hi Kalyani,

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 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.

regards
Andrew​​​​​​​
huihiu 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 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 fateh
You should visit here to learn how to make this formula https://protrackinghub.com/vrl-tracking/ .....
best regards
shakir fateh
You should visit here to learn how to make this formula https://protrackinghub.com/vrl-tracking/ .....
best regards
smantha thorn
TODAY() + CASE(MOD(5 - CASE(MOD(TODAY() - DATE(1900, 1, 7), 7), 0, 1, 2, 3, 3, 4, 2, 5, 1, 6, 0), 7), 0, 5, 1, 5, 2, 5, 3, 7, 4, 7, 5, 6)
TODAY() represents the current date.
MOD(TODAY() - DATE(1900, 1, 7), 7) calculates the number of days that have passed since January 7, 1900 (which was a Sunday) and returns the remainder when divided by 7. This helps determine the day of the week for the current date, where 0 represents Sunday, 1 represents Monday, and so on.
CASE(...) evaluates the result from the previous step and assigns a numeric value based on the day of the week. This is necessary because weekends (Saturday and Sunday) are not considered business days.
MOD(..., 7) is used again to get the remainder when the previous calculation is divided by 7. This step ensures that values greater than 5 are reduced to the range of 0-5.
CASE(...) is used once more to assign a different number of additional days depending on the value obtained from the previous step. This effectively skips weekends and adds the necessary number of business days (5 in this case). I also saw it on st courier tracking (https://anycouriertracking.com/st-courier-tracking/)
Finally, TODAY() + ... adds the calculated number of days to the current date, resulting in a new date that is 5 business days in the future.
You can create a new formula field in Salesforce and use this formula to achieve the desired functionality. Remember to adjust the field type to "Date" when creating the formula field.
I hope this helps! Let me know if you have any further questions.
lonzo brown 6

Hi There,
We are working on website that are give health services in pakistan you can vistis it and check out services rapid healing medical services (https://rapidhms.com/)

josh welch 19
Hi There,
We are working on website that are give health services in Orlando you can vistis it and check out services Serene Behavioral Health (https://serenehs.com/)
josh welch 19
HI there if you want to buy bed or matters you can check dream gold beds (https://dreamgoldbeds.com/) on of the best services they have.
Wilson James 22
Its best if you first trust your Angels and then initiate any work if you are stuck. For this Try Angel Number 2121 (https://angelsnumbers.net/angel-number-2121/