How to add 2 business days to the date

I want to add 2 business days to certain date by excluding saturday and sunday

any suggestions how to do this

Hi @vikram ,

Just to reclarify, you want addition of 2 business days in the current date and this should not consider Weekends. Say if friday is your date addition should give you tuesday. Right ?

have a view on this thread.

Regards,
NaNi

yes , it should be Tuesday in case of Friday

Hi @vikram

Try out this below syntax
create a new datetime variable Ex:newdate
newdate=yourdatevariabble.AddDays(2)
image
newdate=if(newdate.DayOfWeek=6,variable1.AddDays(4),if(newdate.DayOfWeek=7,variable1.AddDays(3),variable1.AddDays(2)))

image

It will exclude saturday and sunday

use newdate variable where you want to use

Hope is solves your issue

update us whether you got your desired answer or not

thanks,
Robin

1 Like

@vikram

we can compact it by following:
myDateTime.AddDays({3,2,2,2,4,4,3}(myDateTime.DayOfWeek))
myDateTime is of DataType: DateTime - e-g- Now

Test series:
grafik

Find starter help here:
GetNextWorkDayWithOffset.xaml (6.4 KB)