473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to find last day of next week?

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
2 1655
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: pyuk2005 | last post by:
The UK Python Conference for 2005 will take place at the Randolph Hotel, Oxford on 20-23 April 2005. This is the FINAL CALL for talks. The original deadline of 26th December has been extended...
2
by: John | last post by:
If anyone can help me out with a good way to do this in javascript I would greatly appreciate it. I need to compute three dates in javascript - all of which relate to a given date, say todays...
13
by: SimonC | last post by:
I would like to return data from the last 2 weeks of each given month in Javascript, but in 2 formats. So, the penultimate week (Monday to Sunday) and the last week (Monday to ??) I'm not...
3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
2
by: Chapai | last post by:
Hi all! I need your help to realize algorithm for stored proc or trigger. tool: SQL TABLE:
3
by: Adam | last post by:
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
17
by: michel.ank | last post by:
Hi, I'm using the class PrintLines and my last record of page aren't with the borders. Somebody can help me? Thanks,
1
SHOverine
by: SHOverine | last post by:
Recently my web host decided to "upgrade". This change rendered many of my pages useless and I am scrambling to fix the issues, so you may see several posts from me in the coming days. My first...
0
by: marlberg | last post by:
Platform: Windows2000, WindowsXP, Windows Vista, etc Language: C#, ASP.NET Pre-compiled Libraries: Enterprise Library 3.0 full I have a requirement to implement in and display in C# and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.