As CF is a loosly typed language you could simply do
<cfif find(".0",#bathrooms#) eq 0>
--whole bathrooms
<cfelse>
--partial bathrooms
</cfif>
Question is though how do you have .5 of a bathroom, isnt this like half a
hole?
Jason Lees
Systems Developer
National Express Coaches Ltd.
-----Original Message-----
From: Cutter (CF_Talk) [mailto:[EMAIL PROTECTED]]
Sent: 18 November 2002 15:28
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
Get the mailserver that powers this list at http://www.coolfusion.com