How to find last day of next week?

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top