OOPs
My field isn't an integer- it's a string.  It isn't just a year 2002/ but
set as a school year
2002-2003
2003-2004
So the school year that ends in 2003 I want blue
and the school year that ends in 2004 I want in purple...

-----Original Message-----
From: webguy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 8:44 AM
To: CF-Talk
Subject: RE: Wuick question: if odd/if even


yeap, here u go

if (year mod 2)
        year even
else
        year odd

you can use IIF like this too, but the above is easier to read...

WG


> -----Original Message-----
> From: Janine Jakim [mailto:[EMAIL PROTECTED]]
> Sent: 12 December 2002 13:32
> To: CF-Talk
> Subject: Wuick question: if odd/if even
>
>
> I Know this is easy....Iwant a different background depending on the year
> chosen by the user- basically if it ends as an odd number make background
> blue if year ends with even number make background green.  Is
> there a better
> way than saying <cif (Right(#Year#, 1) EQ 1) or (Right(#Year#, 1) EQ 3) or
> (Right(#Year#, 1) EQ 5) or (Right(#Year#, 7) EQ 1)etc.....
> Thanks,
> j
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to