Final out put like Today date is 28-Apr-2021
Output like.but it should not include saturdays and sundays(only working days) 27-Apr-2021 26-Apr-2021 23-Apr-2021 Like this...
Final out put like Today date is 28-Apr-2021
Output like.but it should not include saturdays and sundays(only working days) 27-Apr-2021 26-Apr-2021 23-Apr-2021 Like this...
I think I have just understood you. What you want is that the output of the file should only be on working days. Well, you can try this:
a = WeekDay("4/26/2021")
msgbox a
or this
a = WeekDay(Date)
msgbox a
You have to keep in mind that for Windows the day Sunday =1, Monday =2..... Saturday = 7 or you can also define which day of the week you want to be the first day of the week and play with that
Here's a simple way to loop through dates and check the day of the week using Weekday function. This function returns a list of
daysToList
dates starting from yesterday, skipping weekends: