RE: Converting Year to Integer

2009-07-25 Thread Adrian Lynch
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

Re: Converting Year to Integer

2009-07-24 Thread Francois Levesque
You'll need some hash signs around that currYear variable in your cfloop: CFLOOP index=yearCnt from='2000' to='#currYear#' tr tdCFOUTPUT#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

Re: Converting Year to Integer

2009-07-24 Thread N K
## Sign does not help either. NK You'll need some hash signs around that currYear variable in your cfloop: CFLOOP index=yearCnt from='2000' to='#currYear#' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop Francois Levesque http://blog.critical-web.com/

RE: Converting Year to Integer

2009-07-24 Thread Adrian Lynch
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

Re: Converting Year to Integer

2009-07-24 Thread N K
Yes thats a typo in my email.Adding ## sign does not help The error coming up is Attribute validation error for the CFLOOP tag. The value of the TO attribute is invalid. The value cannot be converted to a numeric because it is not a simple value.Simple values are booleans, numbers,

Re: Converting Year to Integer

2009-07-24 Thread Francois Levesque
cfset currYear= Year((now())) cfset currYear=int(currYear) CFLOOP index=yearCnt from='2000' to='#currYear#' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop is working fine on my end. If you're still getting an error there must be a typo somewhere. Francois Levesque

Re: Converting Year to Integer

2009-07-24 Thread Dave Sueltenfuss
Have you tried outputing your currYear variable, to make sure it is what you expect? On Fri, Jul 24, 2009 at 9:47 AM, N K neetukais...@gmail.com wrote: Yes thats a typo in my email.Adding ## sign does not help The error coming up is Attribute validation error for the CFLOOP tag. The

RE: Converting Year to Integer

2009-07-24 Thread Adrian Lynch
And failing that, post all your code... -Original Message- From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] Sent: 24 July 2009 14:56 To: cf-talk Subject: Re: Converting Year to Integer Have you tried outputing your currYear variable, to make sure it is what you expect

Re: Converting Year to Integer

2009-07-24 Thread Gavin Stewart
Yes thats a typo in my email.Adding ## sign does not help you need to remove the quotes araound 2000 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing

Re: Converting Year to Integer

2009-07-24 Thread Azadi Saryev
simple CFLOOP index=yearCnt from='2000' to='#year(now())#' should work just fine. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 21:31, N K wrote: CFLOOP index=yearCnt from='2000' to='currYear' ~| Want

Re: Converting Year to Integer

2009-07-24 Thread N K
Solved , finally works , not sure what was wrong though. NK Have you tried outputing your currYear variable, to make sure it is what you expect? ~| Want to reach the ColdFusion community with something they want? Let them

Re: Converting Year to Integer

2009-07-24 Thread N K
currYear with out codes and inside ## sign WORKS !!! CFLOOP index=yearCnt from='2000' to=#currYear# NK simple CFLOOP index=yearCnt from='2000' to='#year(now())#' should work just fine. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 21:31, N K wrote: CFLOOP

RE: Converting Year to Integer

2009-07-24 Thread Adrian Lynch
Right but something else is wrong. Azadi's example is about as simple as it gets. Something else in your code is causing the problem. -Original Message- From: N K [mailto:neetukais...@gmail.com] Sent: 24 July 2009 15:09 To: cf-talk Subject: Re: Converting Year to Integer

RE: Converting Year to Integer

2009-07-24 Thread Billy Cox
Try this: CFLOOP index=yearCnt from='2000' to='#currYear#' -Original Message- From: Adrian Lynch [mailto:cont...@adrianlynch.co.uk] Sent: Friday, July 24, 2009 9:44 AM To: cf-talk Subject: RE: Converting Year to Integer Right but something else is wrong. Azadi's example is about

Re: Converting Year to Integer

2009-07-24 Thread N K
This is the who;e code which I had to do in order for it work cfset currYear= Year(now()) cfset currYear=int(currYear) cfoutputcfset currYear=#currYear#/cfoutput CFLOOP index=yearCnt from='2000' to=#currYear# !---Query /CFLOOP And I do understand that every thing else listed on this

Re: Converting Year to Integer

2009-07-24 Thread Azadi Saryev
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

Re: Converting Year to Integer

2009-07-24 Thread N K
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()