S SVA Member Joined Oct 12, 2006 Messages 16 Programming Experience 3-5 Jan 22, 2007 #1 Hello, How can I define the date of the next coming Monday, starting from today ? (I have VB 2005)
JohnH VB.NET Forum Moderator Staff member Joined Dec 17, 2005 Messages 15,799 Location Norway Programming Experience 10+ Jan 22, 2007 #2 VB.NET: Dim today As Date = Date.Now Dim nextmonday As Date = [SIZE=2]today.AddDays(IIf(today.DayOfWeek = 0, 1, 8 - today.DayOfWeek))[/SIZE] Last edited: Jan 22, 2007 Upvote 0 Downvote
VB.NET: Dim today As Date = Date.Now Dim nextmonday As Date = [SIZE=2]today.AddDays(IIf(today.DayOfWeek = 0, 1, 8 - today.DayOfWeek))[/SIZE]
S SVA Member Joined Oct 12, 2006 Messages 16 Programming Experience 3-5 Jan 22, 2007 #3 Thank You Very Much For The Prompt Reply Johnh!!! Upvote 0 Downvote