Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exclusion of Holidays

Hi,

I have one date field named 'start_date'.I need to calculate the 'due_date' using that field according to below logic:

'due_date' should be 24 hours after the 'start_date'.But the 'due_date' shouldn't be a holiday.

Here 4 cases are arising:

1.If the start date is between Mon-Thu

2.If the start date is Fri

3.If the start date is Sat

4.If the start date is Sun


Please help me guys with your precise logic.


Thanks in Advance

1 Solution

Accepted Solutions
prat1507
Specialist
Specialist

Use

=if(WeekDay(date(start_date)+1)='Sat',Timestamp(start_date+3),

if(WeekDay(date(start_date)+1)='Sun',Timestamp(start_date+2),

Timestamp(start_date+1)))

View solution in original post

8 Replies
swuehl
MVP
MVP

Not quite sure how you handle weekend.

But maybe

lastworkdate(start_date+1, 1 {, holiday})

prat1507
Specialist
Specialist

What are your holidays? Sat and Sun?

Regards

Pratyush

Anonymous
Not applicable
Author

It gives only date. I need time as well.Actually 'start_date' is a time-stamp field.

Anonymous
Not applicable
Author

yes

prat1507
Specialist
Specialist

Use

=if(WeekDay(date(start_date)+1)='Sat',Timestamp(start_date+3),

if(WeekDay(date(start_date)+1)='Sun',Timestamp(start_date+2),

Timestamp(start_date+1)))

Anonymous
Not applicable
Author

Thanks buddy

Anonymous
Not applicable
Author

Thanks Stefan

swuehl
MVP
MVP

Maybe just

Timestamp(lastworkdate(start_date+1, 1 {, holiday})+frac(start_date))