By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,556 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,556 IT Pros & Developers. It's quick & easy.

How to find last day of next week?

P: n/a
Hello,

How to find a last day of the next week (or in next two weeks) using VB.NET?
for example:

01-Feb-2005 = 13-Feb-2005
or
09-May-2005 = 22-May-2005
Any help is greatly appreciated,
Adam
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Adam,

Very simple
Dim LastDayNexWeek As DateTime = Now.AddDays(14 - Now.DayOfWeek)
Dim LastDay14days As DateTime = Now.AddDays(21 - Now.DayOfWeek)

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
Thanks a lot Cor,
Adam

"Cor Ligthert" <no************@planet.nl> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
Adam,

Very simple
Dim LastDayNexWeek As DateTime = Now.AddDays(14 - Now.DayOfWeek)
Dim LastDay14days As DateTime = Now.AddDays(21 - Now.DayOfWeek)

I hope this helps,

Cor

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.