4 Replies Latest reply on Feb 24, 2016 4:28 AM by beverly

# week days project calculating

dears,

good day to you.

i have a project table i would like to get the finish date based on the start date and the numbers of days i will be putting excluding the weekends.

the working days are from Sunday to Thursday.

weekends are Friday and Saturday.

the fields related to this issue is

start date          type: date

days                 type: number

finish date         type: date

• ###### 1. Re: week days project calculating

Hi aboblal80,

This might work as a calculation for finish date in your case. Make sure the result of the calculation is of type Date also.

Case( days ≤ 1 ;

// project ends on same day:

start date

;

// project ends after start date:

Let([

moredays = days-1 ; // days beyond start date

wholeweeks = Int( moredays / 5 ) ;

rest = Mod( moredays ; 5 ) ; // 0 to 4

skipweekend = If( DayOfWeek(startdate) + rest > 5 ; 2 ; 0 )

];

start date + 7 * wholeweeks + rest + skipweekend

)

)

Regards,

Peter Bouma

• ###### 2. Re: week days project calculating

Small edit: 'rest' is the Dutch word for 'remainder', I shouldn't have assumed it's also the English word... PB

• ###### 3. Re: week days project calculating

many thanks to you

it worked like a charm

• ###### 4. Re: week days project calculating

While you have marked a correct answer already, this thread may be of interest to you. There are several methods mentioned.