I think what Mr. Orlini  is looking for is something like this.


<cfset displayNumber = 7/100>
<cfoutput>#numberFormat(displayNumber,'.99')#></cfoutput>


Now if you wanted to do this in one line, this might work and least in CFMX


<cfoutput>#numberFormat((7/100),'99')#></cfoutput>


Wow, see the problem here, apparently even though you don't put anything in
front of the decimal in the mask, you still get a leading Zero.  I guess you
would have to string process this then.  This is more complex then it needs
to be.


<cfoutput>#right(numberformat((7/100),'.__'),len(numberformat((7/100),'.__')
)-1)#</cfoutput>


Anybody explain why you couldn't do this with a mask only?

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 12:58 PM
To: CF-Talk
Subject: RE: numberformat

that code doesnt make sense? what are you trying to show here?

tony

-----Original Message-----
From: Robert Redpath [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3:54 PM
To: CF-Talk
Subject: RE: numberformat

Try something like:

<cfset "dividByHundred" = (#NumberFormat(yourVar,"9999.99")#/100)>

-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3:43 PM
To: CF-Talk
Subject: RE: numberformat

Thanks. How do I incorporate the / 100 into the mask. I'm new to this
and am
getting errors.

Robert O.

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3:37 PM
To: CF-Talk
Subject: RE: numberformat

yeah, i was about to say, math.

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3:35 PM
To: CF-Talk
Subject: Re: numberformat

divide by 100 ;-)

I'm not sure you can make a 7 display as a decimal value using
masks...but dividing by 100 will get ya there

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
  ----- Original Message -----
  From: Robert Orlini
  To: CF-Talk
  Sent: Monday, November 17, 2003 12:17 PM
  Subject: numberformat

  How do I apply the numberformat mask to make a 7 view as .07?

  Thanks.

  Robert O.

  _____  

  _____  

   _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to