Get first day of week and more!

Joined
Oct 18, 2007
Messages
1
Reaction score
0
Hi guys.
I`m developing some reports for work and our scheduling system uses a week pattern which looks like this:
NNNNNYYYYYYYNYYYYYYYYNNYYYYYYNYYYYYYNNYYYYYNYYYYNNNNN

Each N or Y represents a week. The first N/Y in the string is the week containing the 30th July.
This year the 30th July was a Monday but that will not always be the case so I need to find the date of the Monday in the week containing the 30th and then use that to get the start and end dates of every subsequent week.

All I have so far is:

Code:
        Dim weeks As String = "NNNNNYYYYYYYNYYYYYYYYNNYYYYYYNYYYYYYNNYYYYYNYYYYNNNNN"

        Dim dt As New DateTime(2007, 7, 30)
        Response.Write(dt.DayOfWeek.ToString())

Its not alot but, to be honest, I haven't a clue where to go from here to get the results that I need.:hmm2:

Any and all help will be greatly appreciated.

hermiod
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top