I need a solution to this issue. The answer can be in VB or VBScript as I will be translating it to VBScript for running in an ASP page later.
I'm getting really confused with the VB Date calculations where one gets 53 weeks in a year, and working out what is the first and last week in a year.
What I need is this..
A way to ask for the date range of the week in a month. The number of days do NOT have to equal 7.
For example if I ask xxx routine Year=2005, Month = 1, Week = 1, Weekstart = vbMonday
I will get 01/01/2005 - 01/02/2005 (2 days)
If I ask xxx routine Year=2005, Month = 1, Week = 2, Weekstart = vbMonday
I will get 01/03/2005 - 01/09/2005 etc
I know I will be getting upto 6 weeks in the month but that is ok. And when I reach 31/12/2005 that will be 12/26/2005 - 12/31/2005.
Many thanks for any prompt reply