But then to take Azadi's point 4 and change it for this: 4) again, the simple <cfset currentYear = year(now())> <cfloop from="2000" to="#currentYear#" index="yearCnt"> ALWAYS works.
Something else is amiss. > -----Original Message----- > From: N K [mailto:[email protected]] > Sent: 24 July 2009 18:48 > To: cf-talk > Subject: Re: Converting Year to Integer > > > The whole idea of not using "to="#year(now())#" and declaring it is > because the currYear variable is used at more than one place. > > So if the variable is set used CFSET then there are couple of > modifications required. > > NK > > >1) year(now()) returns an integer - there is no need to call int() > >function on it. > > > >2) the <cfoutput>... line in your code is totally useless and > unnecessary. > > > >3) is this code of yours in a cfm page or in a cfc function? > > > >4) again, the simple > ><cfloop from="2000" to="#year(now())#" index="yearCnt"> > >ALWAYS works. > > > > > >Azadi Saryev > >Sabai-dee.com > >http://www.sabai-dee.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:324966 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

