This content has been marked as final. Show 4 replies
This is screaming for a structure or array or maybe an array of
structures possible even an component|object.
But if you insist on doing it this way, array notation is what you are
<cfset variables['date' & i] = dateFormat(dateAdd('M',i,now()))>
In addition to what Ian said, Cold Fusion is probably letting you get away with a bad programming practice. DateFormat returns a string, not a date. Plus, the fact that you are creating odbcdates inside a loop suggestst that you are doing something inefficient elsewhere in your app.
<CFSET "VARIABLES.EndDate#i#" = "#Month1#/#numDays1#/#Year1#">