Do a greater than less than instead of a between On Tue, 5 Feb 2002, Sean Daniels wrote:
> I want to have some seasonal content in an app I am building. The content > will reside in a db and I want to query for it based on today's date. I a m > clear on how I could do this for a single year: simply put fields to sear ch > on for start and end dates and look for records where getdate() between > start_date and end_date. However, next year these dates would be invalid. > > I'm sure there is some slick way to do this computation based on the curr ent > day of the year (1-365), but I'm not sure of how exactly to store the val id > range. I could have content valid from day 27 through day 189 of the same > year. Or, I could have content valid from day 325 through day 4 of the > following year. So a simple "between start_day and end_day" won't do the > trick. > > Thanks in advance. > > - Sean > > ~~~~~~~~~~~~~~~~~~~~~~~~~~ > Sean Daniels > Director, Engineering > Marketplace Technologies, Inc > (T): 207.363.7374 > (C): 207.332.6340 > (F): 240.269.6319 > ~~~~~~~~~~~~~~~~~~~~~~~~~~ > http://www.dealforce.com > http://www.mergernetwork.com > > > ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

