You can also return the appropriate value from Oracle directly, using:

to_char(whatever_column_name,'TM9')

-----Original Message-----
From: B G [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 13 April 2005 6:04 AM
To: CF-Talk
Subject: Re: Decimal Formatting

Beautiful!  That did the trick!  Thank you.

>From: Barney Boisvert <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: CF-Talk <[email protected]>
>Subject: Re: Decimal Formatting
>Date: Tue, 12 Apr 2005 14:45:33 -0700
>
>NUMBER columns are actually stored as strings, so you'll always get 
>exactly 2 decimal places.  Try this:
>
><cfif myNum EQ int(myNum)>
>   #int(myNum)#
><cfelse>
>   #REreplace(myNum, "0+$", "")#
></cfif>
>
>cheers,
>barneyb
>
>On Apr 12, 2005 2:38 PM, B G <[EMAIL PROTECTED]> wrote:
> > There's a simple solution here that is eluding me so please forgive 
> > my
>"end
> > of day cloud" that is obstructing me.
> >
> > I am trying to format a value that is stored in Oracle NUMBER(5,2)
>datatype
> > so that if it is a whole number it won't display x.00.
> >
> > For example, value 25.75 is fine and displays properly, value 18, 
> > should
>NOT
> > display 18.00.  Likewise, 10.5 should NOT be 10.50.  But this is the 
> > behaviour I am getting.
> >
> > What are you thoughts?
>
>--
>Barney Boisvert
>[EMAIL PROTECTED]
>360.319.6145
>http://www.barneyb.com/
>
>Got Gmail? I have 50 invites.
>
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202526
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