m:
Monday is the beginning of the workweek and the first full week of
jan 09 (5th) Business cycles beg on mon - end on friday (no
weekends)
it very well could be the ending number but i would like to know
the logic to write either code..
"Feed a man for the day - you resolve his hunger for the day;
Teach a man to Fish and you feed him for life!"
Public Function MyCurrentWeekMonday(Year_Week as string) as date
Dim MyYear as integer
Dim MyWeek as integer
Dim MyDay1 as integer
Dim MyFirstMonday as Date
'separate the week from the year
MyYear = val(left(Year_Week,4))
MyWeek = val(mid(Year_Week,5))
'Now find the weekday of january 1st of your year.
MyDay1 = weekday(dateserial(myYear,1,1), vbMonday)
' Find monday of week 1
MyFirstMonday = dateadd("d",8-MyDay1,dateserial(MyYear,1,1))
'add the number of weeks
MyCurrentWeekMonday = dateadd("ww",MyWeek,MyFirstMonday)
Exit function
You should add some error checking to trap garbage Year_Week inputs.