How to get 3 business days date prior to Current date

Hello,

I need to get 3 business days date prior to Current date, Saturday Sunday needs to be excluded.

For example, Today is Monday output should be Previous Wednesday

Please help, Thanks in advance

Hi
try this
Main.xaml (13.2 KB)

Hope it helps

Regards,
Usha

@Pramod_Mangale

previousBusinessDay=DateTime.Today.AddDays(If(DateTime.Today.DayOfWeek = DayOfWeek.Monday, -3, -1))
previousBusinessDay.ToString(“yyyy-MM-dd”)

BusinessDay = YourDate.AddDays({-5,-5,-5,-5,-3,-3,-3}(YourDate.DayOfWeek))

in the Array we configured the offset, first item offset for a Sunday,
then Mon,Tue…Sat

Hi @Pramod_Mangale

Please find below xaml for your reference

Sequence.xaml (14.4 KB)

1 Like

This worked, Thanks a lot

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.