Level 1

0% to

Level 2

Tip /

to gain points, level up, and earn exciting badges like the new
Mission!

View all

coreywallen
Level 1

Likes

0 likes

Total Posts

1 post

0 solutions
View profile

coreywallen
Level 1

Likes

0 likes

Total Posts

1 post

0 solutions
View profile
coreywallen
Level 1

21-04-2016

Hey everyone, need some quick help adding business days to the date of another field. I currently only have a simple formula for adding five days to the the other field. Here is what I have. I need Field 2 to calculate 5 business days into the future based off of Field 1. Appreciate the help in advance. I've done a lot of searching around and just can't wrap my head around anything that is said to work.

Field 1: "DateFormCompleted" (User Entered)

Field 2: "RequestedCompletionDate" (Calculated - User Can Override)

Current FormCalc for "RequestedCompletionDate":

Num2Date((Date2Num(DateFormCompleted.formattedValue) + 5))

#### Accepted Solutions (0)

tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

10 solutions
View profile

tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

10 solutions
View profile
tarekahf
Level 5

25-04-2016

Mind you that FormCalc is not supported on HTML5 forms. You have to convert to JavaScript.

Tarek

Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

155 solutions
View profile

Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

155 solutions
View profile
Magus069
MVP

21-04-2016

Hi there,

a good way to do this, you would need to use the modulus (JavaScript : %, FormCalc : Mod(n1, n2)) to know exactly which day of the week the first date is,

you'll need to do some tests to see which day of the week represents which number... (I think 0 is sunday)

let's say you get a wednesday, you'll know you will need to do +7(weekend) considering +5 business days

Also if you're going in deep, if you have to consider the public holidays, you will have to register the days and then know exactly what is the modulus of that day on 365 for a normal year and 366 for a leap year