You'll need some hash signs around that currYear variable in your cfloop:
<CFLOOP index="yearCnt" from='2000' to='#currYear#'>
<tr>
 <td><CFOUTPUT>#yearCnt#</CFOUTPUT></td>
</tr>
</cfloop>

Francois Levesque
http://blog.critical-web.com/


On Fri, Jul 24, 2009 at 9:31 AM, N K <neetukais...@gmail.com> wrote:

>
> I am looping the records starting from the Year 2000 to current year.
> But some how the the CFLOOP gives me an error stating "Can not convert into
> number"
>
> I tried the following ,any idea how to fix the issue:--
>
> <cfset currYear= Year((now))>
> <cfset currYear=int(currYear)>
>
> <table>
>
> <CFLOOP index="yearCnt" from='2000' to='currYear'>
> <tr>
>  <td><CFOUTPUT>#yearCnt#</CFOUTPUT></td>
> </tr>
> </cfloop>
> </table>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324923
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to