In case anyone is interested, I worked out a solution.

#Replace(DecimalFormat(number),'.00','')#

Easy eh :-)

Russ 

-----Original Message-----
From: Snake [mailto:[EMAIL PROTECTED] 
Sent: 13 February 2006 13:12
To: CF-Talk
Subject: RE: Decimal places

I did consider the "storing as varchar" option.
Although there is potentially going to be a performance hit converting
everything back to numeric in my queries. 

Russ

-----Original Message-----
From: Eric Roberts [mailto:[EMAIL PROTECTED]
Sent: 13 February 2006 03:56
To: CF-Talk
Subject: RE: Decimal places

CF will output whatever the db gives it.  If it is given a number in
scientific notation, it will output the number in scientific notation.  I
think the text option is best unless you know what the output mask needs to
be for that particular number, then you can use numberformat or
decimalformat to make sure you are getting what you want.  I'm not sure if
there is another solution to that.

-----Original Message-----
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, 12 February 2006 10:19
To: CF-Talk
Subject: RE: Decimal places

The problem is not the way the database stores the number, it's formatting
the output.


-----Original Message-----
From: Jeff Garza [mailto:[EMAIL PROTECTED]
Sent: 12 February 2006 14:55
To: CF-Talk
Subject: RE: Decimal places

Unfortunately, that is just the way things go when dealing with a database.
Databases handle numbers in a way that's efficient for it, not for you.  If
you want your number to come out exactly the way it went in, store it as a
varchar.

-----Original Message-----
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 12, 2006 4:20 AM
To: CF-Talk
Subject: RE: Decimal places

Barney,

I'm not sure why your not sure, I think I explained it pretty well.

> My problem is that I need to display the original number in it's 
> original format unchanged.

So if the number is 345
I want to display 345
If the number is 2367457234572345723
I want to display 2367457234572345723
If the number is 34.89
I want to display 34.89

Whether or not 1.078E+07 is called an equation or a notation is totally
irrelevant, this is how long numbers are stored in the database, if you just
output the column, you will get is displayed as 1.078E+07, which is no good,
so you have to use Numberformat() to display the real number. This then
causes the problem I have detailed below, you cannot display the original
number in it's original format, you either have to force decimal points or
exclude them.

Russ













~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232465
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to