Otuatail wrote:
> I am using VB Script. The only one
> that I know I am A vb Programmer.
Say you want to find out the beginning of week 49.
Step 0. n is 49.
n = 49
Step 1. Take the beginning of the year.
y = Format(Now(), "yyyy")
beginningOfYearString = "1/1/" & y & "00:00:00"
Step 2. Turn this from a String into a Date.
beginningOfYearDate = CDate(beginningOfYearString)
Step 3. Add on 49 Weeks. Depending on what you count as "week 1",
you may want to change 'n' to 'n+1' or 'n-1' or something.
wantedDate = beginningOfYearDate.AddDays(7 * (n))
Step 4. Go forward to the Saturday.
While Weekday(wantedDate)
wantedDate.AddDays(1)
Wend
I think that should do what you want, but my VisualBASIC is a little rusty.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me -
http://www.goddamn.co.uk/tobyink/?page=132