Have you looked at the DateAdd and Weekday functions? You can add any number of weeks to a date. January, 2000 began on a Saturday, so adding a week will always return a saturday date (you can use Weekday function to confirm this), so you need to subtract one to get the friday date.
for example:
DateAdd("ww", 1, #1/1/00#) = 1/8/00
Then
dateadd("d",-1,#1/8/00#) = 1/7/00, which is the friday of the first week of the year.
just a quick change to kathryn's post will keep it running well past Y2K. Replace "#1/1/00" with (DateValue("1/1/" & Year(Now()), so the ammended function would be:
Also, not that the single quotes around the d are repalced w/ double quotes.
[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.