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 am
clear on how I could do this for a single year: simply put fields to search
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 current
day of the year (1-365), but I'm not sure of how exactly to store the valid
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
______________________________________________________________________
Get Your Own 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=coldfusionb
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