First, I would put all of the special dates, with their respective hours, in a DB table.
Then, depending on your database platform, either create a "Calendar" table with dates for many years to come, or, if you have SQL Server, use the query in the link below: http://www.c-sharpcorner.com/Blogs/BlogDetail.aspx?BlogId=692 -----Original Message----- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2008 4:03 AM To: cf-talk Subject: Slotting dates into standard date range Ok, Maybe not the best title, but let me try and explain: I have a list of standard opening hours, Monday to Sunday. I can then add specific dates where the hours are different, for example 24th december 2008 09.00 - 16.00 lets say. That's all fine. Now I want users to be able to enter a date range and I'll return them the opening hours for every day in that range (yes, I know but that's what the client wants). So I need to be able to pull all the special opening hours in that range and insert them into the standard opening hours where relevant. Any suggestions on the best way to achieve this? I'm thinking I need to create a structure of dates from the start to the end date, then replace the special opening hours on thoise dates that have one. Does that sound sensible, or am I missing a trick here? My heart always drops when I have to deal with dates and CF - so fernickity. Will ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315281 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

