Both sets of data will be stored in a db, standard and non standard opening
hours. Thanks Mike, doing a join on the tables makes sense to me.

Cheers

Will 

-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED] 
Sent: 14 November 2008 14:30
To: cf-talk
Subject: RE: Slotting dates into standard date range

Dang, this message got sent before I was done with it.

In addition...

Once you have all this in a database, you can then OUTER JOIN the two tables
(Master Calendar and Business Hours Exceptions) using the date range on the
master calendar table to control the returned dates.

Most of the columns, for the exceptions table, will be empty.  However,
where there is a value, use it instead of the default "opening hours"
value.

Mike

-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2008 8:26 AM
To: cf-talk
Subject: RE: Slotting dates into standard date range

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:315285
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to