Quote:
quote:Originally posted by Imar
Maybe you should convert the end- and startdate to a datevalue first.....
|
That's basically what I did to fix the problem. I just changed the logic to start one day outside DST to force one iteration of the DateAdd.
I've been asked why I need to keep calculating the date and can't I just store it once (from an efficiency perspective). The problem is that
all dates and times presented in the site must be adjusted. Thus I always need to find the begin/end dates for the year of the date in question. I suppose I could cache the dates by year since there shouldn't be that many different years. It comes down to balancing the I/O of a database read vs. a small loop of (at most) 7 iterations. Well, that's for when I'm bored and have absolutely nothing else to do. :D
Bruce Luckcuck
Director, Applications & Support Services
Wiley Publishing, Inc.