rounding up to nearest (5) days | Adobe Higher Education
Skip to main content
ReluctantProgrammer
Level 4
March 9, 2023
解決済み

rounding up to nearest (5) days

  • March 9, 2023
  • 1 の返信
  • 838 ビュー

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

このトピックへの返信は締め切られました。
ベストアンサー 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 の返信

SivakumarKanoori
Community Advisor
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!!