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


-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: 12 February 2006 05:06
To: CF-Talk
Subject: Re: Decimal places

I'm not sure what exactly you're asking.  1.078E+07 isn't an equation, just
scientific notation.  Are you saying your DB is returning numbers of that
format, and you want to display them through CF as "normal"
decimal numbers?  Or something else?

cheers,
barneyb

On 2/11/06, Snake <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I have a simple problem, but cf doesn't seem to want to comply.
>
> I have numbers stored in my database, some of which are very large and 
> thus get stored as equations (1.078E+07), so I have to use 
> numberformat() on them to get them to display the original number.
> My problem is that I need to display the original number in it's 
> original format unchanged.
> Any combination of masks using numberformat() doesn't do this. I can 
> either have decimal places or not, I can't seem to only display them if
they exist.
> E.G.
>
> If I use numberFormat(data , '99999999.99')
> 2 decimal places will be added to all numbers whether they have any or
not.
> If I use numberFormat(data , '99999999_99') No decimal points  are 
> shown whether they exist or not. According to the docs, this should 
> show an optional decimal point though.
> I have tried all the masks to no avail.
>
> I even tried
>
> <cfif data contains ".">
> Display with decimal place
> <cfelse>
> Don't
> </cfif>
>
> But that doesn't work either.
>
> I don't really want to have to do workarounds like converting numbers 
> to strings, there must be an easy way to do what I want?
>
>
> --
> Russ


--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232058
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to