rounding up to nearest (5) days | Community
Skip to main content
ReluctantProgrammer
Level 4
March 9, 2023
Solved

rounding up to nearest (5) days

  • March 9, 2023
  • 1 reply
  • 832 views

I have a field that shows the total # of actual days and I want to create a field that will take that # and round it up to the nearest 5 days.  

 

Example 1:  total actual working days = 18; total days = 20

Example 2:  total actual working days = 24; total days = 25

 

How can I do that?  Here is my file

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SivakumarKanoori

@reluctantprogrammer :

 

You can use below JS method to get it done.

 

Math.ceil(total actual working days / 5) * 5;

E.g:

Math.ceil(18 / 5) * 5;
20

1 reply

SivakumarKanoori
Community Advisor
SivakumarKanooriCommunity AdvisorAccepted solution
Community Advisor
March 10, 2023

@reluctantprogrammer :

 

You can use below JS method to get it done.

 

Math.ceil(total actual working days / 5) * 5;

E.g:

Math.ceil(18 / 5) * 5;
20

Thanks,Siva
ReluctantProgrammer
Level 4
March 14, 2023

That's what I needed.  Thanks!!