How can I tell if a number is even

sluggercoach

Registered User.
Local time
Today, 12:24
Joined
Jun 12, 2007
Messages
21
Hi. I need a way to determine if a number in a query is even. Anyone know how?
 
Hi -

Try the Mod operator, e.g.

x = 7
? iif(x mod 2 = 0, "Even", "Odd")
Odd

x = 244
? iif(x mod 2 = 0, "Even", "Odd")
Even

HTH - Bob
 
Use the mod operator

IIf(number mod 2=0,true,false)

Brian

Damn that Bob and these slow fingers. :D
 

Users who are viewing this thread

Back
Top Bottom