Calculate 15th working day of the month(does not include Saturdays and Sundays)

Hi Everyone,

Can somebody help me in how to find 15th working day of a month, working day suggests it doesn’t includes saturday and sunday .

Feel free to asks questions
Immediate help required.

Thanks !!

Hi @Shikhar_Tandon

Might this pseudo Code help You :-

Dim count = 0
Dim totalDays = (dtpEndDate - dtpStartDate).Days

For i = 0 To totalDays
    Dim weekday As DayOfWeek = startDate.AddDays(i).DayOfWeek
    If weekday <> DayOfWeek.Saturday AndAlso weekday <> DayOfWeek.Sunday Then
        count += 1
    End If

lblNoOfDays.Text = count

So you can loop this till the count wont get 15 and return the 15th Working Day

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:


Did you get a chance to check the below component?

Please let me know if this doesn’t works


1 Like

Thanks for the quick help @Pratik_Wavhal !!

Can you please share a xaml or a running code for the same , it would be very helpful !!


Thankyou both of you for the reply :slight_smile:
Generated a logic self for the requirement

Cheers !!