you could use this i believe:
<cfif gettoken(bathrooms,2,".") eq 0>
        #gettoken(bathrooms,1,".")#
<cfelse>
        #bathrooms#
</cfif>

-----Original Message-----
From: Cutter (CF_Talk) [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:28 AM
To: CF-Talk
Subject: Checking a float


A have a float field in a db to store the number of bathrooms for a 
property ( 1.5 bathrooms, 3 bathrooms). My question is, how do I check 
to see if there is a non zero value after the decimal? I want it to show:

1.5 bathrooms
3 bathrooms

and not:

1.5 bathrooms
3.0 bathrooms

Any help is greatly appreciated.

Cutter
Falcon Knives


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to