SOLVED

Workday.intl - wrong end date

Copper Contributor

Hi. I am working on a project planning in order to create a Gantt chart and I'm using workday.intl to get the end date (completion date). My inputs are - starting date (of a task) and the duration (how long will take to complete the task) in order to get the end date (completion date) - we don't work Saturday and Sunday and Bank holidays.

I'm using workday.intl(start_date,days,weekend (chose 1-as Saturday and Sunday are weekend days,holidays)-1 and receive as a result Sunday instead of Friday. 

For example, the start date of a task is Thursday and takes 2 days to complete the task, instead of getting Friday as a result, I get Sunday? I have checked and Sunday seems to be the first day of the week, can I change this to Monday and to get the correct end dates for my workday.intl function? Thank you in advance. 

3 Replies
best response confirmed by Eliza_Roman (Copper Contributor)
Solution

@Eliza_Roman That's due to the -1 at the end. Without it the formula will return the following Monday, which is the 2nd working day after Thursday. Friday being the 1st, Monday the 2nd. Deducting 1 outside the brackets turns it into Sunday as the connection with working days is lost. You obviously want to count the Thursday as the first day. Then you need to rewrite the formula by deducting 1 from the number of days. Note the C2-1 in the picture below.

Riny_van_Eekelen_0-1645006053971.png

 

 

 

Thank you @Riny_van_Eekelen
Sorted now. You are my hero!

@Eliza_Roman Glad I could help

1 best response

Accepted Solutions
best response confirmed by Eliza_Roman (Copper Contributor)
Solution

@Eliza_Roman That's due to the -1 at the end. Without it the formula will return the following Monday, which is the 2nd working day after Thursday. Friday being the 1st, Monday the 2nd. Deducting 1 outside the brackets turns it into Sunday as the connection with working days is lost. You obviously want to count the Thursday as the first day. Then you need to rewrite the formula by deducting 1 from the number of days. Note the C2-1 in the picture below.

Riny_van_Eekelen_0-1645006053971.png

 

 

 

View solution in original post