Hello,
    I have two files that use the same code, except for how the initial array 
is created.  One works, the other gives me an error when I try to work it into 
a  dateDiff()
1.      The one that works creates the initial array like this: 
<cfset dates = arrayNew(1)>
<cfset arrayAppend(dates, createDate(2013, 6, 1))>
<cfset arrayAppend(dates, createDate(2013, 6, 2))>
    The <cfdump> shows an array with each date in one slot.
2.      The one that doesn’t work gets the data from a query like this:
   <cfset dates = arrayNew(1)>
   <cfloop query="currentClosures">
       <cfset dates[CurrentRow][1] = holidayDate>
   </cfloop>
   It shows an error in the browser that says: 
“The value class coldfusion.runtime.Struct cannot be converted to a date.”
  And references the line that says: “<cfif dateDiff("d", 
newDates[arraylen(newDates)].last, dates[x]) is 1>”

The <cfdump> shows an array of structures with each date in one slot, labeled 
as a structure.
It looks like this is what is giving me a problem.  Can you tell me what I can 
do to put the query results into an array – without it being an array of 
structures?   I think if I can do that, I believe the rest of the code will 
work.  
Thanks much, Lewis

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:6073
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to