Tuesday, 24 July 2012

VB.NET - How to get last Sunday, last Saturday, etc

Dim LastSaturday As Date = Now.AddDays(-(Now.DayOfWeek + 1))
Dim LastSunday As Date = Now.AddDays(-(Now.DayOfWeek ))
Dim PreviousSunday As Date = Now.AddDays(-(Now.DayOfWeek + 7))


More Info:

No comments:

Post a Comment