I want to know how to find the last two week monday dates if i run the bot from the current week.
For e.g if i run the bot now, previous week monday date is march 09 and another previous week date is march 02, i want to retrieve these 2 dates. please help.
dtToday = DateTime.Now
numDay = (int)dtToday.DayOfWeek
If (numDay = 0)
PrvMonday = dtToday.AddDays(-6)
PrvPrvMonday = dtToday.AddDays(-13)
PrvMonday = dtToday.AddDays(-(numDay+6))
PrvPrvMonday = dtToday.AddDays(-(numDay+13))
Here 0 is considered as new week starts with Sunday.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.