|
rdouglass -> RE: asp count question (2/5/2008 15:52:32)
|
If you *always* have data for the current month and not try to show other months, you could use the Date() and assume it was this month. That just seems too restrictive to me. However, if you can somehow pass the year and month (in a querystring perhaps when you click the link to launch this), then you could do something like this: IF (DatePart("w",(Request.querystring("month") & "/" & MyRs("WhateverTheDayOfTheMonthFieldIs") & "/" & Request.querystring("year"))) <> 1) AND ... Does that make any sense? What I'm doing there is re-creating the date based on querystrings of "month" and "year" and whatever field value you're passing for that day representative. I'd use that for all 3 'date' criteria. Then I'm calculating whether it is a Sunday in that particular case above. If the logic there makes sense, you probably could do it before the IF..THEN like so: myNewDate = Request.querystring("month") & "/" & MyRs("WhateverTheDayOfTheMonthFieldIs") & "/" & Request.querystring("year") Then: IF (DatePart("w",myNewDate) <> 1) AND (DatePart("w",myNewDate) <> 7) Then That help any?
|
|
|
|