Is Year((now)) a typo in your email? If not, try Year(Now()) and you will need the #'s in the to attribute of cfloop.
Adrian > -----Original Message----- > From: N K [mailto:neetukais...@gmail.com] > Sent: 24 July 2009 14:31 > To: cf-talk > Subject: Converting Year to Integer > > > 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:324925 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4