Our DBA created a days table with days and weekending column from 2002 until 2009 for us... That would have made it a lot simplier, heh. And it's not all that large either. 2922 rows, 2 columns.. not large at all.
Then you could have done it all within SQL and not have to rely on CF. On 11/4/05, Ian Skinner <[EMAIL PROTECTED]> wrote: > Here is the solution I put together. Any comments on how this could be > simplified. > > <cfscript> > currentDate = arguments.beginDate; > dateString = "SELECT TO_DATE('" & > dateFormat(currentDate,"mm/dd/yyyy") & "', 'mm/dd/yyyy') AllDates FROM DUAL"; > currentDate = dateAdd("d",1,currentDate); > > while (dateCompare(currentDate,arguments.endDate) LTE 0) > { > dateString = dateString & " UNION "; > dateString = dateSTring & "SELECT TO_DATE('" & > dateFormat(currentDate,"mm/dd/yyyy") & "', 'mm/dd/yyyy') AllDates FROM DUAL"; > > currentDate = dateAdd("d",1,currentDate); > } > </cfscript> > > > -------------- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223191 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54