Re: Numberformat and cfgrid

2007-09-23 Thread Steve Sequenzia
 Ray Camden has blogged about column rendring, maybe you check that out.
 
 
 
 On 9/21/07, Steve Sequenzia [EMAIL PROTECTED] wrote:
  I just need to add commas to a grid column that are displaying 
 numbers. I think I need to use numberformat but I am not sure how to 
 use it.
 
  Any help would be great.
 
  


~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289256
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Numberformat and cfgrid

2007-09-21 Thread gary gilbert
Hi Steve,

I also have a post about cell renderers you can see it here
http://www.garyrgilbert.com/blog/index.cfm/2007/8/24/CFGRID-Cell-Renderer-Revisited

-- 
Gary Gilbert
http://www.garyrgilbert.com/blog


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289071
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Numberformat and cfgrid

2007-09-20 Thread Andrew Scott
Ray Camden has blogged about column rendring, maybe you check that out.


On 9/21/07, Steve Sequenzia [EMAIL PROTECTED] wrote:
 I just need to add commas to a grid column that are displaying numbers. I 
 think I need to use numberformat but I am not sure how to use it.

 Any help would be great.

 

~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289064
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Numberformat not working

2007-03-22 Thread Bruce Sorge
That did it. Thanks Peter.

On 3/21/07, Peter Boughton [EMAIL PROTECTED] wrote:

 Try setting type to currency.





~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273379
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Numberformat not working

2007-03-21 Thread Peter Boughton
Try setting type to currency.

ie:
cfgridcolumn name=TotalMoneySpent header=Total $ Spent On Election 
numberformat=$__.__ type=currency

I have this line of code:

cfgridcolumn name=TotalMoneySpent header=Total $ Spent On Election
numberformat=$__.__

The problem is that I am not getting the properly formatted number. My
column just shows someting like 22369.22 rather than @22369.22. In the
table, the data is entered as 22369.22 and the field is a type of Money.

Thanks,

-- 
Bruce Sorge

I'm a mawg: half man, half dog. I'm my own best friend!

~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273336
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: NumberFormat problem

2006-03-06 Thread Mingo Hagen
Hey Mark,

how about this:

cfscript
  VARIABLES.someVar = 350;
  VARIABLES.digit2 = VARIABLES.someVar / 1024 / 1024;
  VARIABLES.ImageMaxFileSize1 = NumberFormat(VARIABLES.digit2, ,._)  
mb;

  writeOutput( VARIABLES.ImageMaxFileSize1 );
/cfscript

Mingo.


Mark Leder wrote:
 What am I missing here?  I want to set a simple number format function but I
 can't get the decimal in the right place, tried forcing the integer to the
 left, tried dashes, single quotes around the mask, etc. Nothing works.
  
 cfscript
   VARIABLES.someVar = 350
   VARIABLES.digit2 = Left(VARIABLES.someVar, 2); 
   VARIABLES.ImageMaxFileSize1 = #NumberFormat(VARIABLES.digit2, L.9)#mb;

 /cfscript
  
 cfoutput#VARIABLES.ImageMaxFileSize1#/cfoutput
  
 I want the output to be 3.5mb
  
 Thanks,
 Mark
  




 

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


RE: NumberFormat problem

2006-03-06 Thread Mark Leder
That worked.  Thanks! 


Thanks,
Mark

-Original Message-
From: Mingo Hagen [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 06, 2006 11:01 AM
To: CF-Talk
Subject: Re: NumberFormat problem

Hey Mark,

how about this:

cfscript
  VARIABLES.someVar = 350;
  VARIABLES.digit2 = VARIABLES.someVar / 1024 / 1024;
  VARIABLES.ImageMaxFileSize1 = NumberFormat(VARIABLES.digit2, ,._) 
mb;

  writeOutput( VARIABLES.ImageMaxFileSize1 ); /cfscript

Mingo.


Mark Leder wrote:
 What am I missing here?  I want to set a simple number format function 
 but I can't get the decimal in the right place, tried forcing the 
 integer to the left, tried dashes, single quotes around the mask, etc.
Nothing works.
  
 cfscript
   VARIABLES.someVar = 350
   VARIABLES.digit2 = Left(VARIABLES.someVar, 2); 
   VARIABLES.ImageMaxFileSize1 = #NumberFormat(VARIABLES.digit2, 
 L.9)#mb;

 /cfscript
  
 cfoutput#VARIABLES.ImageMaxFileSize1#/cfoutput
  
 I want the output to be 3.5mb
  
 Thanks,
 Mark
  




 



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


RE: NumberFormat problem

2006-03-06 Thread James Smith
 cfscript
   VARIABLES.someVar = 350;
   VARIABLES.digit2 = VARIABLES.someVar / 1024 / 1024;
   VARIABLES.ImageMaxFileSize1 = 
 NumberFormat(VARIABLES.digit2, ,._)  mb;
 
   writeOutput( VARIABLES.ImageMaxFileSize1 ); /cfscript
Wouldn't

cfscript
  variables.someVar = '350';
  writeOutput(numberFormat(variables.someVar / 1048576 , ,._)  mb);
/cfscript

Be a little faster ;)

NOTE: kidding, please don't flame me!

--
Jay


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


Re: NumberFormat , Help

2005-07-26 Thread Barney Boisvert
I don't think you can do it in one step.  However, this should work:

#replace(numberFormat(myNumber, 000.00), ., )#

cheers,
barneyb

On 7/26/05, Aldon Moore [EMAIL PROTECTED] wrote:
 I have a dollar value of ($73.60)thats stored in the database as 73.6. I
 would like to format this number and display it as a twelve digits
 (0007360). Similarly if the value is 12 the format shoshould be
 (0001200)
 
 Any help would be appreciated.
 
 
-- 
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:212798
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


Re: NumberFormat , Help

2005-07-26 Thread Aaron DC
Cheap and nasty:

right(  YourValue * 1000, 12)

HTH
Aaron

Aldon Moore wrote:

I have a dollar value of ($73.60)thats stored in the database as 73.6. I
would like to format this number and display it as a twelve digits
(0007360). Similarly if the value is 12 the format shoshould be
(0001200)

Any help would be appreciated.




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

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


Re: NumberFormat , Help

2005-07-26 Thread S . Isaac Dealey
 I have a dollar value of ($73.60)thats stored in the
 database as 73.6. I
 would like to format this number and display it as a
 twelve digits
 (0007360). Similarly if the value is 12 the format
 shoshould be
 (0001200)

 Any help would be appreciated.

#numberformat(n*100,repeatstring(0,12))#


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

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


RE: NumberFormat , Help

2005-07-26 Thread Mark A Kruger
Isaac,

Wouldn't this work as well?

#numberformat(var * 100, )#

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 9:40 AM
To: CF-Talk
Subject: Re: NumberFormat , Help


 I have a dollar value of ($73.60)thats stored in the
 database as 73.6. I
 would like to format this number and display it as a
 twelve digits
 (0007360). Similarly if the value is 12 the format
 shoshould be
 (0001200)

 Any help would be appreciated.

#numberformat(n*100,repeatstring(0,12))#


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm






~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

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


RE: NumberFormat , Help

2005-07-26 Thread S . Isaac Dealey
 Isaac,

 Wouldn't this work as well?

 #numberformat(var * 100, )#

It would... I used repeatString(0,12) for legibility -- and because if
the length of the string changes, it's easier to change 12 to another
number than to count the number of zeroes. 6 of one 1/2 doz. of the
other really.


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~|
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:212837
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


RE: NumberFormat , Help

2005-07-26 Thread Aldon
Thanks Guy's

Al
-Original Message-
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 12:09 PM
To: CF-Talk
Subject: RE: NumberFormat , Help


 Isaac,

 Wouldn't this work as well?

 #numberformat(var * 100, )#

It would... I used repeatString(0,12) for legibility -- and because if
the length of the string changes, it's easier to change 12 to another
number than to count the number of zeroes. 6 of one 1/2 doz. of the
other really.


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm






~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

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


Re: numberformat

2003-11-17 Thread Bryan Stevenson
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]




RE: numberformat

2003-11-17 Thread Tony Weeg
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]




RE: numberformat

2003-11-17 Thread Robert Orlini
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]




Re: numberformat

2003-11-17 Thread Bryan Stevenson
Just before you NumberFormat() it...

cfset MyValue = MyValue/100
#NumberFormat(MyValue,mask)#

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:42 PM
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]




RE: numberformat

2003-11-17 Thread J E VanOver
It DOESN'T go into the mask.Do the math, then mask the results.

-Original Message-
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 12: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]




RE: numberformat

2003-11-17 Thread Robert Redpath
Try something like:

 
cfset dividByHundred = (#NumberFormat(yourVar,.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]




RE: numberformat

2003-11-17 Thread Tony Weeg
sorry, they were obvious gestures at what we thought was
fairly straightforward.the function wont do that basically, 
not from what i can tell.but, in order to do so, you would have to
create a value that is .07 like this...

cfset theNumber = 7 / 100

and then you can strip the leading zero off...

cfoutput#right(theNumber,3)#/cfoutput

but that would only work if you knew the results were going to look like
0.07, the actual value of 7 / 100 in cfmx.

there are a myriad of ways to do this, im sure, but you could start
here...
i couldnt get the mask thingie to work and not show the leading zero??
anyone??

tony

-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]




RE: numberformat

2003-11-17 Thread Tony Weeg
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,.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]




RE: numberformat

2003-11-17 Thread Robert Orlini
Thanks Robert and all for the suggestions.

 
Robert O.

-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,.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]




RE: numberformat

2003-11-17 Thread J E VanOver
If you're using CF 5 or later you can use this function:

cfscript
function maskit(myNum) {
var aNum = myNum / 100;
var newNum = numberFormat(aNum,.00);
return (replace(newNum,0.,.);
}
/cfscript

Then in your code, #maskit(7)#

Strangely, on my computer, numberFormat(aNum,.00) will STILL put a leading
zero on the number -- that's what the replace is for in the return

-Original Message-
From: J E VanOver [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 12:59 PM
To: CF-Talk
Subject: RE: numberformat

It DOESN'T go into the mask.Do the math, then mask the results.

-Original Message-
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 12: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]




RE: numberformat

2003-11-17 Thread Robert Redpath
Should be:

 
cfset dividByHundred = (#NumberFormat(yourVar,.99)#/100) 

 
For example: 
 7/100 = 0.07
mask (#NumberFormat(7,.99)#should output .07(right?)

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3: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,.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]




RE: numberformat

2003-11-17 Thread Schuster, Steven
Why not use DecimalFormat()

 


 
Steve

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

 
Thanks Robert and all for the suggestions.

Robert O.

-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,.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]




RE: numberformat

2003-11-17 Thread Tony Weeg
nahh...the quotes around divideByHundred are not necessary, in fact
will throw an error.

the correct format for this bit of code would be

cfset divideByHundred = NumberFormat('0.07','.__')

but that would give you 0.07, not good.

the way i posted in my previous email is one way, tho'

tony

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

Should be:

 
cfset dividByHundred = (#NumberFormat(yourVar,.99)#/100) 

 
For example: 
 7/100 = 0.07
mask (#NumberFormat(7,.99)#should output .07(right?)

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 3: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,.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]




RE: numberformat

2003-11-17 Thread Tony Weeg
now theres a novel concept...does that perform better in this instance?

nope, cause at the base of the idea...

cfset divideByHundred = decimalFormat(0.07) 

cfoutput#divideByHundred#/cfoutput

just gives you the same thing.

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:19 PM
To: CF-Talk
Subject: RE: numberformat

Why not use DecimalFormat()

 


 
Steve

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

 
Thanks Robert and all for the suggestions.

Robert O.

-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,.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]




RE: numberformat

2003-11-17 Thread Tony Weeg
im not sure there is another way to do it..the masks
in numberformat() dont produce what you would expect, strange??

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:19 PM
To: CF-Talk
Subject: RE: numberformat

Why not use DecimalFormat()

 


 
Steve

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

 
Thanks Robert and all for the suggestions.

Robert O.

-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,.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]




RE: numberformat

2003-11-17 Thread Ian Skinner
I think what Mr. Orliniis 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,.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]




RE: numberformat

2003-11-17 Thread Tony Weeg
thats what i put in my first email, you reiterated perfectly :)

not sure, why about the mask that is...

that was the first question i asked.

tony

-Original Message-
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:25 PM
To: CF-Talk
Subject: RE: numberformat

I think what Mr. Orliniis 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,.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]




RE: numberformat

2003-11-17 Thread Schuster, Steven
cfset MyNum = 7
#DecimalFormat(MyNum/100)#

 
That will display 7 as .07

 
Now, if you wanted to parse any passed int that would be easy enough as
well.

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

 
im not sure there is another way to do it..the masks
in numberformat() dont produce what you would expect, strange??

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:19 PM
To: CF-Talk
Subject: RE: numberformat

Why not use DecimalFormat()



Steve

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

Thanks Robert and all for the suggestions.

Robert O.

-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,.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]




RE: numberformat

2003-11-17 Thread Tony Weeg
0.07 

is what that code shows

sorry.i thought so too!!

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:45 PM
To: CF-Talk
Subject: RE: numberformat

cfset MyNum = 7
#DecimalFormat(MyNum/100)#

 
That will display 7 as .07

 
Now, if you wanted to parse any passed int that would be easy enough as
well.

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

 
im not sure there is another way to do it..the masks
in numberformat() dont produce what you would expect, strange??

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:19 PM
To: CF-Talk
Subject: RE: numberformat

Why not use DecimalFormat()



Steve

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

Thanks Robert and all for the suggestions.

Robert O.

-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,.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]




RE: numberformat

2003-11-17 Thread Schuster, Steven
This assumes that you never want anything in the 1's place so numbers over
99 are just fubar. If you want any number then I think it would be easy
enough to modify.

cfset MyNum = 7
#Mid(DecimalFormat(MyNum/100),FindOneOf(DecimalFormat(MyNum/100),1)+1,Len(
DecimalFormat(MyNum/100)))#

 
br

cfset MyNum = 15
#Mid(DecimalFormat(MyNum/100),FindOneOf(DecimalFormat(MyNum/100),1)+1,Len(
DecimalFormat(MyNum/100)))#


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

 
0.07 

is what that code shows

sorry.i thought so too!!

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:45 PM
To: CF-Talk
Subject: RE: numberformat

cfset MyNum = 7
#DecimalFormat(MyNum/100)#

That will display 7 as .07

Now, if you wanted to parse any passed int that would be easy enough as
well.

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

im not sure there is another way to do it..the masks
in numberformat() dont produce what you would expect, strange??

tony

-Original Message-
From: Schuster, Steven [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 4:19 PM
To: CF-Talk
Subject: RE: numberformat

Why not use DecimalFormat()



Steve

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

Thanks Robert and all for the suggestions.

Robert O.

-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,.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]




RE: NumberFormat() Mask

2002-04-29 Thread Dave Watts

 I need to display a column of percentages, formatted with 
 2 digits following the decimal place and one, two, or three 
 to the left. I need numbers less than 1 formatted with a 
 leading zero. I'm having a time finding anappropriate 
 NumberFormat() mask to do this. I'm assuming there is one,
 which could well be wrong.
 
 Number   Formatted
 1.23  1.23
 33.4 33.40
 78.5178.51
 100 100.00
 20.20
 37   0.37
 
 Anyone know how to do this? The leading zero seems to be 
 the catch.

Try this:

NumberFormat(myval, __0.00)

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: NumberFormat() Mask

2002-04-29 Thread Jim McAtee

Thanks, Dave.  Dunno why I couldn't find it.  It ended up being either
___.__ or ___.00.  For some reason __0.00 pads the left hand side with
up to three zeroes.  Go figure.

Jim


- Original Message -
From: Dave Watts [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 7:05 PM
Subject: RE: NumberFormat() Mask


  I need to display a column of percentages, formatted with
  2 digits following the decimal place and one, two, or three
  to the left. I need numbers less than 1 formatted with a
  leading zero. I'm having a time finding anappropriate
  NumberFormat() mask to do this. I'm assuming there is one,
  which could well be wrong.
 
  Number   Formatted
  1.23  1.23
  33.4 33.40
  78.5178.51
  100 100.00
  20.20
  37   0.37
 
  Anyone know how to do this? The leading zero seems to be
  the catch.

 Try this:

 NumberFormat(myval, __0.00)

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 voice: (202) 797-5496
 fax: (202) 797-5444

 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: NumberFormat UGH

2002-04-22 Thread Will Swain

sounds like the problem is with the DB you are using. Not sure how
formatting the number with CF once you have pulled it from the db would
help.

What DB is it you are using?

will

-Original Message-
From: David Schmidt [mailto:[EMAIL PROTECTED]]
Sent: 19 April 2002 20:54
To: CF-Talk
Subject: RE: NumberFormat UGH


Will that work for Income Taxes too???

 -Original Message-
 From: Justin Hansen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 19, 2002 12:48 PM
 To: CF-Talk
 Subject: RE: NumberFormat UGH


 Place curser on your NumberFormat and push the F1 key.
 All answers shall be revealed. :)

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 19, 2002 2:37 PM
 To: CF-Talk
 Subject: NumberFormat UGH


 I have searched hi and low for some explination, but am at a loss.

 I have a column in the db: weight, it is a float

 Values can range beyond 123445.23223  and .03322323

 Is there a way to use numberformat so you can show these as they
 are... when
 I stick .03322323 into the database, it comes out

 3.32232299E-2

 Can't use decimalformat, need the multiple decimals ...
 numberformat either
 padds too many spaces or doesn't give me enough..

 Anyone have any good recommendations for formating variable sized numbers
 with decimals?

 Thank

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector v2.0 - Commerce Builder






__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: NumberFormat UGH

2002-04-19 Thread Justin Hansen

Place curser on your NumberFormat and push the F1 key.
All answers shall be revealed. :)

-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 2:37 PM
To: CF-Talk
Subject: NumberFormat UGH


I have searched hi and low for some explination, but am at a loss.

I have a column in the db: weight, it is a float

Values can range beyond 123445.23223  and .03322323

Is there a way to use numberformat so you can show these as they are... when
I stick .03322323 into the database, it comes out

3.32232299E-2

Can't use decimalformat, need the multiple decimals ... numberformat either
padds too many spaces or doesn't give me enough..

Anyone have any good recommendations for formating variable sized numbers
with decimals?

Thank

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector v2.0 - Commerce Builder




__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: NumberFormat UGH

2002-04-19 Thread Justin Hansen

Just kidding I'm at a loss. There may be a UDF at http://www.cflib.org
that can help.

-Original Message-
From: Justin Hansen [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 2:48 PM
To: CF-Talk
Subject: RE: NumberFormat UGH


Place curser on your NumberFormat and push the F1 key.
All answers shall be revealed. :)

-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 2:37 PM
To: CF-Talk
Subject: NumberFormat UGH


I have searched hi and low for some explination, but am at a loss.

I have a column in the db: weight, it is a float

Values can range beyond 123445.23223  and .03322323

Is there a way to use numberformat so you can show these as they are... when
I stick .03322323 into the database, it comes out

3.32232299E-2

Can't use decimalformat, need the multiple decimals ... numberformat either
padds too many spaces or doesn't give me enough..

Anyone have any good recommendations for formating variable sized numbers
with decimals?

Thank

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector v2.0 - Commerce Builder





__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: NumberFormat UGH

2002-04-19 Thread David Schmidt

Will that work for Income Taxes too???

 -Original Message-
 From: Justin Hansen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 19, 2002 12:48 PM
 To: CF-Talk
 Subject: RE: NumberFormat UGH
 
 
 Place curser on your NumberFormat and push the F1 key.
 All answers shall be revealed. :)
 
 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 19, 2002 2:37 PM
 To: CF-Talk
 Subject: NumberFormat UGH
 
 
 I have searched hi and low for some explination, but am at a loss.
 
 I have a column in the db: weight, it is a float
 
 Values can range beyond 123445.23223  and .03322323
 
 Is there a way to use numberformat so you can show these as they 
 are... when
 I stick .03322323 into the database, it comes out
 
 3.32232299E-2
 
 Can't use decimalformat, need the multiple decimals ... 
 numberformat either
 padds too many spaces or doesn't give me enough..
 
 Anyone have any good recommendations for formating variable sized numbers
 with decimals?
 
 Thank
 
 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector v2.0 - Commerce Builder
 
 
 
 
 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: NumberFormat UGH

2002-04-19 Thread Paul Giesenhagen

Been there done that, but I am either not too smart, or there is no way
around either having spaces or numbers deleted

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector v2.0 - Commerce Builder


 Place curser on your NumberFormat and push the F1 key.
 All answers shall be revealed. :)

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 19, 2002 2:37 PM
 To: CF-Talk
 Subject: NumberFormat UGH


 I have searched hi and low for some explination, but am at a loss.

 I have a column in the db: weight, it is a float

 Values can range beyond 123445.23223  and .03322323

 Is there a way to use numberformat so you can show these as they are...
when
 I stick .03322323 into the database, it comes out

 3.32232299E-2

 Can't use decimalformat, need the multiple decimals ... numberformat
either
 padds too many spaces or doesn't give me enough..

 Anyone have any good recommendations for formating variable sized numbers
 with decimals?

 Thank

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector v2.0 - Commerce Builder




 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: NumberFormat UGH

2002-04-19 Thread Howie Hamlin

Not if you use notepad...

Howie

- Original Message - 
From: Justin Hansen [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 3:47 PM
Subject: RE: NumberFormat UGH


 Place curser on your NumberFormat and push the F1 key.
 All answers shall be revealed. :)
 
 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 19, 2002 2:37 PM
 To: CF-Talk
 Subject: NumberFormat UGH
 
 
 I have searched hi and low for some explination, but am at a loss.
 
 I have a column in the db: weight, it is a float
 
 Values can range beyond 123445.23223  and .03322323
 
 Is there a way to use numberformat so you can show these as they are... when
 I stick .03322323 into the database, it comes out
 
 3.32232299E-2
 
 Can't use decimalformat, need the multiple decimals ... numberformat either
 padds too many spaces or doesn't give me enough..
 
 Anyone have any good recommendations for formating variable sized numbers
 with decimals?
 
 Thank
 
 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector v2.0 - Commerce Builder
 
 
 
 
 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: NumberFormat UGH

2002-04-19 Thread Douglas Brown

Try


#LSParseNumber()#




Success is a journey, not a destination!!



Doug Brown
- Original Message -
From: Howie Hamlin [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 1:04 PM
Subject: Re: NumberFormat UGH


 Not if you use notepad...

 Howie

 - Original Message -
 From: Justin Hansen [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, April 19, 2002 3:47 PM
 Subject: RE: NumberFormat UGH


  Place curser on your NumberFormat and push the F1 key.
  All answers shall be revealed. :)
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 19, 2002 2:37 PM
  To: CF-Talk
  Subject: NumberFormat UGH
 
 
  I have searched hi and low for some explination, but am at a loss.
 
  I have a column in the db: weight, it is a float
 
  Values can range beyond 123445.23223  and .03322323
 
  Is there a way to use numberformat so you can show these as they are... when
  I stick .03322323 into the database, it comes out
 
  3.32232299E-2
 
  Can't use decimalformat, need the multiple decimals ... numberformat either
  padds too many spaces or doesn't give me enough..
 
  Anyone have any good recommendations for formating variable sized numbers
  with decimals?
 
  Thank
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector v2.0 - Commerce Builder
 
 
 
 
 
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: NumberFormat woes

2001-04-30 Thread stas

cfif num lte 9cfset num = 0#num#/cfif

This gives you a string though, so do any calculations before output.

- Original Message -
From: Evan Lavidor [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, April 30, 2001 11:36 AM
Subject: NumberFormat woes


I feel a little silly about not being able to figure this out...

I'm using CF 4.5.1 SP2.

I have a list of numbers: 7, 10, 203, 8, 26, etc.

I want the single digit numbers to display as two digits (07, 08, etc.).
All other numbers should just display as they are (10, 203, 26, etc.).

I've tried NumberFormat(mynumber, 00), but then I get an error if there's
a three digit number.

I've tried NumberFormat(mynumber, 999), but that doesn't display the
single digits as two digits.

I've tried NumberFormat(mynumber, 900), but that displays the single
digits with two leading zeros.

I've tried other, similar combinations as well - all with no success.

Any ideas?

Thanks,

Evan

--
-=-=-=-=-=-=-=-=-=-
Evan Lavidor
Circle.com Boston
Tel: 617-585-3107
Fax: 617-585-3091
-=-=-=-=-=-=-=-=-=-
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: NumberFormat woes

2001-04-30 Thread Stuart Duncan


If all you want to do is display it with a 0 in front, but want to keep it 
a number for calculations and such, than just do this

cfif len(num) eq 1 0#num# cfelse #num# /cfif

It'll check to see if it's only 1 digit, and if so, it'll place that 0 in 
front. Otherwise, just display the number.  That way, they'll stay numbers, 
and not become strings.

Stuart Duncan
MaracasMedia Inc.


At 04:16 PM 4/30/01 -0400, you wrote:
irrelevant... you can do calculations via val(string). or you can do cfset
like so:

cfset num = 0  num

and cf creates a num usable in a calculation. at least in vs.4.5.2.

Alexander Sicular
Chief Technology Architect
The Neurological Institute of New York
Columbia University
212.305.1318
as867 {at} columbia [dot] edu


  -Original Message-
  From: stas [mailto:[EMAIL PROTECTED]]
  Sent: Monday, April 30, 2001 12:49 PM
  To: CF-Talk
  Subject: Re: NumberFormat woes
 
 
  cfif num lte 9cfset num = 0#num#/cfif
 
  This gives you a string though, so do any calculations before output.
 
  - Original Message -
  From: Evan Lavidor [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Monday, April 30, 2001 11:36 AM
  Subject: NumberFormat woes
 
 
  I feel a little silly about not being able to figure this out...
 
  I'm using CF 4.5.1 SP2.
 
  I have a list of numbers: 7, 10, 203, 8, 26, etc.
 
  I want the single digit numbers to display as two digits (07,
  08, etc.).
  All other numbers should just display as they are (10, 203, 26, etc.).
 
  I've tried NumberFormat(mynumber, 00), but then I get an
  error if there's
  a three digit number.
 
  I've tried NumberFormat(mynumber, 999), but that doesn't display the
  single digits as two digits.
 
  I've tried NumberFormat(mynumber, 900), but that displays the single
  digits with two leading zeros.
 
  I've tried other, similar combinations as well - all with no success.
 
  Any ideas?
 
  Thanks,
 
  Evan
 
  --
  -=-=-=-=-=-=-=-=-=-
  Evan Lavidor
  Circle.com Boston
  Tel: 617-585-3107
  Fax: 617-585-3091
  -=-=-=-=-=-=-=-=-=-
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: NumberFormat woes

2001-04-30 Thread Sicular, Alexander

irrelevant... you can do calculations via val(string). or you can do cfset
like so:

cfset num = 0  num 

and cf creates a num usable in a calculation. at least in vs.4.5.2.

Alexander Sicular
Chief Technology Architect
The Neurological Institute of New York
Columbia University
212.305.1318
as867 {at} columbia [dot] edu


 -Original Message-
 From: stas [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 30, 2001 12:49 PM
 To: CF-Talk
 Subject: Re: NumberFormat woes
 
 
 cfif num lte 9cfset num = 0#num#/cfif
 
 This gives you a string though, so do any calculations before output.
 
 - Original Message -
 From: Evan Lavidor [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, April 30, 2001 11:36 AM
 Subject: NumberFormat woes
 
 
 I feel a little silly about not being able to figure this out...
 
 I'm using CF 4.5.1 SP2.
 
 I have a list of numbers: 7, 10, 203, 8, 26, etc.
 
 I want the single digit numbers to display as two digits (07, 
 08, etc.).
 All other numbers should just display as they are (10, 203, 26, etc.).
 
 I've tried NumberFormat(mynumber, 00), but then I get an 
 error if there's
 a three digit number.
 
 I've tried NumberFormat(mynumber, 999), but that doesn't display the
 single digits as two digits.
 
 I've tried NumberFormat(mynumber, 900), but that displays the single
 digits with two leading zeros.
 
 I've tried other, similar combinations as well - all with no success.
 
 Any ideas?
 
 Thanks,
 
 Evan
 
 --
 -=-=-=-=-=-=-=-=-=-
 Evan Lavidor
 Circle.com Boston
 Tel: 617-585-3107
 Fax: 617-585-3091
 -=-=-=-=-=-=-=-=-=-

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread Tumy, Brad

can't you output like this:

$#numberformat(number,mask)#

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 11:36 AM
To: CF-Talk
Subject: Numberformat question.


I have a situation where I need to display a price with either 2, 3 or 4
digits after the decimal place.  The database is storing the information
properly, but I need to format the display to "trim" the output.

For example, I have three prices for four items:

Item 1 has a price of 45.9
Item 2 has a price of 9.99
Item 3 has a price of 2.985
Item 4 has a price of 0.4585

I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
it trims at two decimal places.  The question is, how do I set up the
NumberFormat to show the pricing properly when possible top-ends are up to
$999,999,999.?

TIA
Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread Larry Juncker

This isn't pretty, however it does work.

CFIF Len(ListLast(Item,".")) EQ 1
#NumberFormat(Item, "$999,999.9")#
CFELSEIF   Len(ListLast(Item,".")) EQ 2
#NumberFormat(Item, "$999,999.99")#
CFELSEIF   Len(ListLast(Item,".")) EQ 3
#NumberFormat(Item, "$999,999.999")#
CFELSEIF   Len(ListLast(Item,".")) EQ 4
#NumberFormat(Item, "$999,999.")#
/CFIF


Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.


-Original Message-
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 10:36 AM
To: CF-Talk
Subject: Numberformat question.


I have a situation where I need to display a price with either 2, 3 or 4
digits after the decimal place.  The database is storing the information
properly, but I need to format the display to "trim" the output.

For example, I have three prices for four items:

Item 1 has a price of 45.9
Item 2 has a price of 9.99
Item 3 has a price of 2.985
Item 4 has a price of 0.4585

I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
it trims at two decimal places.  The question is, how do I set up the
NumberFormat to show the pricing properly when possible top-ends are up to
$999,999,999.?

TIA
Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread C. Hatton Humphrey

I've been playing with a few different masks, but anytime I set up a decimal
mask it's forcing all the places, so for example, if I have the mask set at
",9$99.", the numbers get formatted (using the examples I cited
originally) $45.9000, $9.9900, $2.8950 and $0.4585.

What I need is $45.90, $9.99, $2.985 and $0.4585.

Hatton

 -Original Message-
 From: Tumy, Brad [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 12:27 PM
 To: CF-Talk
 Subject: RE: Numberformat question.


 can't you output like this:

 $#numberformat(number,mask)#

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 11:36 AM
 To: CF-Talk
 Subject: Numberformat question.


 I have a situation where I need to display a price with either 2, 3 or 4
 digits after the decimal place.  The database is storing the information
 properly, but I need to format the display to "trim" the output.

 For example, I have three prices for four items:

 Item 1 has a price of 45.9
 Item 2 has a price of 9.99
 Item 3 has a price of 2.985
 Item 4 has a price of 0.4585

 I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
 for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
 it trims at two decimal places.  The question is, how do I set up the
 NumberFormat to show the pricing properly when possible top-ends are up to
 $999,999,999.?

 TIA
 Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread C. Hatton Humphrey

Oy, that almost merits being put into a custom tag with as many times as I'm
going to have to call it!

I had come to the conclusion that I could do something similar to this, but
was hoping that there was a way to do it dynamically within the numberformat
function.  I guess there isn't.

Thanks!
Hatton

 -Original Message-
 From: Larry Juncker [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 1:44 PM
 To: CF-Talk
 Subject: RE: Numberformat question.


 This isn't pretty, however it does work.

   CFIF Len(ListLast(Item,".")) EQ 1
   #NumberFormat(Item, "$999,999.9")#
   CFELSEIF   Len(ListLast(Item,".")) EQ 2
   #NumberFormat(Item, "$999,999.99")#
   CFELSEIF   Len(ListLast(Item,".")) EQ 3
   #NumberFormat(Item, "$999,999.999")#
   CFELSEIF   Len(ListLast(Item,".")) EQ 4
   #NumberFormat(Item, "$999,999.")#
   /CFIF


 Larry Juncker
 Senior Cold Fusion Developer
 Heartland Communications Group, Inc.


 -Original Message-
 From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 10:36 AM
 To: CF-Talk
 Subject: Numberformat question.


 I have a situation where I need to display a price with either 2, 3 or 4
 digits after the decimal place.  The database is storing the information
 properly, but I need to format the display to "trim" the output.

 For example, I have three prices for four items:

 Item 1 has a price of 45.9
 Item 2 has a price of 9.99
 Item 3 has a price of 2.985
 Item 4 has a price of 0.4585

 I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
 for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
 it trims at two decimal places.  The question is, how do I set up the
 NumberFormat to show the pricing properly when possible top-ends are up to
 $999,999,999.?

 TIA
 Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread Philip Arnold - ASP

 This isn't pretty, however it does work.

   CFIF Len(ListLast(Item,".")) EQ 1
   #NumberFormat(Item, "$999,999.9")#
   CFELSEIF   Len(ListLast(Item,".")) EQ 2
   #NumberFormat(Item, "$999,999.99")#
   CFELSEIF   Len(ListLast(Item,".")) EQ 3
   #NumberFormat(Item, "$999,999.999")#
   CFELSEIF   Len(ListLast(Item,".")) EQ 4
   #NumberFormat(Item, "$999,999.")#
   /CFIF

A shorter version;
#NumberFormat(Item,"$999,999.#RepeatString("9",Len(ListLast(Item,".")))#")#

Or, if you always want the 2 digits on the end;
#NumberFormat(Item,"$999,999.#RepeatString("9",Max(2,Len(ListLast(Item,"."))
))#")#

I haven't tested this, it's just typed...

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread mherbene

How do you know which number gets which format?  Is there some clue in
another db field, or is it based on how many digits after the decimal point,
or what?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 1:55 PM
To: CF-Talk
Subject: RE: Numberformat question.


I've been playing with a few different masks, but anytime I set up a decimal
mask it's forcing all the places, so for example, if I have the mask set at
",9$99.", the numbers get formatted (using the examples I cited
originally) $45.9000, $9.9900, $2.8950 and $0.4585.

What I need is $45.90, $9.99, $2.985 and $0.4585.

Hatton

 -Original Message-
 From: Tumy, Brad [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 12:27 PM
 To: CF-Talk
 Subject: RE: Numberformat question.


 can't you output like this:

 $#numberformat(number,mask)#

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 05, 2001 11:36 AM
 To: CF-Talk
 Subject: Numberformat question.


 I have a situation where I need to display a price with either 2, 3 or 4
 digits after the decimal place.  The database is storing the information
 properly, but I need to format the display to "trim" the output.

 For example, I have three prices for four items:

 Item 1 has a price of 45.9
 Item 2 has a price of 9.99
 Item 3 has a price of 2.985
 Item 4 has a price of 0.4585

 I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
 for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
 it trims at two decimal places.  The question is, how do I set up the
 NumberFormat to show the pricing properly when possible top-ends are up to
 $999,999,999.?

 TIA
 Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread Larry Juncker

Hatton;

The code below will do exactly as you ask.  Only on the first if statement
where I have the mask as .9 change it to .99 and it works fine.

Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.


-Original Message-
From: Larry Juncker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 12:44 PM
To: CF-Talk
Subject: RE: Numberformat question.


This isn't pretty, however it does work.

CFIF Len(ListLast(Item,".")) EQ 1
#NumberFormat(Item, "$999,999.9")#
CFELSEIF   Len(ListLast(Item,".")) EQ 2
#NumberFormat(Item, "$999,999.99")#
CFELSEIF   Len(ListLast(Item,".")) EQ 3
#NumberFormat(Item, "$999,999.999")#
CFELSEIF   Len(ListLast(Item,".")) EQ 4
#NumberFormat(Item, "$999,999.")#
/CFIF


Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.


-Original Message-
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 10:36 AM
To: CF-Talk
Subject: Numberformat question.


I have a situation where I need to display a price with either 2, 3 or 4
digits after the decimal place.  The database is storing the information
properly, but I need to format the display to "trim" the output.

For example, I have three prices for four items:

Item 1 has a price of 45.9
Item 2 has a price of 9.99
Item 3 has a price of 2.985
Item 4 has a price of 0.4585

I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
it trims at two decimal places.  The question is, how do I set up the
NumberFormat to show the pricing properly when possible top-ends are up to
$999,999,999.?

TIA
Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat question.

2001-04-05 Thread Truman Esmond III

We just found a ready-made solution to the same problem.
Check out Russ Michaels custom tag in the DevEx-
cf_zerokiller found at the URL:

http://devex.allaire.com/developer/gallery/info.cfm?ID=CA34775F-2830-11D4-AA
9700508B94F380method=Full


Does the trick.  Too bad NumberFormat() isn't a little smarter.  ;)
Truman

-Original Message-
From: Larry Juncker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 2:15 PM
To: CF-Talk
Subject: RE: Numberformat question.


Hatton;

The code below will do exactly as you ask.  Only on the first if statement
where I have the mask as .9 change it to .99 and it works fine.

Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.


-Original Message-
From: Larry Juncker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 12:44 PM
To: CF-Talk
Subject: RE: Numberformat question.


This isn't pretty, however it does work.

CFIF Len(ListLast(Item,".")) EQ 1
#NumberFormat(Item, "$999,999.9")#
CFELSEIF   Len(ListLast(Item,".")) EQ 2
#NumberFormat(Item, "$999,999.99")#
CFELSEIF   Len(ListLast(Item,".")) EQ 3
#NumberFormat(Item, "$999,999.999")#
CFELSEIF   Len(ListLast(Item,".")) EQ 4
#NumberFormat(Item, "$999,999.")#
/CFIF


Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.


-Original Message-
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 10:36 AM
To: CF-Talk
Subject: Numberformat question.


I have a situation where I need to display a price with either 2, 3 or 4
digits after the decimal place.  The database is storing the information
properly, but I need to format the display to "trim" the output.

For example, I have three prices for four items:

Item 1 has a price of 45.9
Item 2 has a price of 9.99
Item 3 has a price of 2.985
Item 4 has a price of 0.4585

I need the price to display as $45.90 for Item 1, $9.99 for Item 2, $2.985
for item 3 and $0.4585 for item 4.  I know I can't use DollarFormat, since
it trims at two decimal places.  The question is, how do I set up the
NumberFormat to show the pricing properly when possible top-ends are up to
$999,999,999.?

TIA
Hatton
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: numberformat()

2001-01-03 Thread Larry Juncker

The only way I have been able to get it to do it is:

CFIF varnum LT 10
cfset newnum = 0#varnum#
cfelse
cfset newnum = #varnum#
/cfif

Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.


-Original Message-
From: Barney Stevenson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 11:33 AM
To: CF-Talk
Subject: numberformat()


Hi guys

Probably a no-brainer, this one, but I can't seem to work it out:

what numberformat mask should I use to output a number so that it a)
has a leading zero if it is less than one and b) formats correctly if
it is ten or more?

I've tried:

0.99 - doesn't work for numbers of 10 or more (you end up losing the
second decimal place)

9990.00 - ends up putting four leading zeros (is this a bug?)

.99 - doesn't show the leading zero for numbers less than one.

Any suggestions?

Thanks

Barney
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Numberformat

2000-06-27 Thread Philip Arnold - ASP

 I need help with the NumberFormat function. I need to format 3 dollar sign
 values so that they are right aligned. The numbers vary in length for ex:
 $199.99
  $15.99
   $5.99
 Is there a way to specify the number of digits to display at all times?

Just to throw a spanner into the works - unless you're outputting using
pre then the browsers will "eat" the extra spaces anyways - if you want it
formatted like this on-screen, then put it into a table and use td
align="right" which will naturally put all of the cells aligned properly.

Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Numberformat

2000-06-26 Thread Bill Killillay

Take a look at the RJustify tag.  It will do what you want it to.  If you
need some code samples please let me know.

Bill

 -Original Message-
 From: LM [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 26, 2000 1:22 PM
 To: [EMAIL PROTECTED]
 Subject: Numberformat


 I need help with the NumberFormat function. I need to format 3 dollar sign
 values so that they are right aligned. The numbers vary in length for ex:
 $199.99
  $15.99
   $5.99
 Is there a way to specify the number of digits to display at all times?
 Thanks for your help.



 
 Get free email and a permanent address at http://www.netaddress.com/?N=1
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=stsbody=sts/cf_tal
k or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: [RE: Numberformat]

2000-06-26 Thread LM

Thanks Bill
Yes, I would appreciate it if you can send me the code
This is the code I have
My price is : #DollarFormat(myprice)#
Your price is: #DollarFormat(yourprice)#
I would like to get "My price" and "Your price" left justified and myprice and
yourprice right aligned
Thanks for your help


"Bill Killillay" [EMAIL PROTECTED] wrote:
Take a look at the RJustify tag.  It will do what you want it to.  If you
need some code samples please let me know.

Bill

 -Original Message-
 From: LM [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 26, 2000 1:22 PM
 To: [EMAIL PROTECTED]
 Subject: Numberformat


 I need help with the NumberFormat function. I need to format 3 dollar sign
 values so that they are right aligned. The numbers vary in length for ex:
 $199.99
  $15.99
   $5.99
 Is there a way to specify the number of digits to display at all times?
 Thanks for your help.



 
 Get free email and a permanent address at http://www.netaddress.com/?N=1
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=stsbody=sts/cf_tal
k or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.



Get free email and a permanent address at http://www.netaddress.com/?N=1
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRstsbodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: [RE: Numberformat]

2000-06-26 Thread Mark Warrick

How about RJustify?  There's also a ton of other formatting techniques available in 
the documentation.

---mark


--
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--


 -Original Message-
 From: LM [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 26, 2000 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [RE: Numberformat]
 
 
 Thanks Mark.
 I have tried the following format: #NumberFormat(myprice,'_$.99')#
 and still the numbers are not aligned. I tried also replacing the 
 9s with _
 and it didn't do anything.
 Could you give me any additional assistance?
 Thanks
 "Mark Warrick" [EMAIL PROTECTED] wrote:
 Yes, you can align the numbers so they line up properly.  Search 
 the CF Docs
 for "numberformat" and you'll get all the formatting and masking
 possibilities.
 
 ---mark
 --
 Mark Warrick
 Phone: (714) 547-5386
 Efax.com Fax: (801) 730-7289
 Personal Email: [EMAIL PROTECTED]
 Personal URL: http://www.warrick.net 
 Business Email: [EMAIL PROTECTED]
 Business URL: http://www.fusioneers.com
 ICQ: 346566
 --
 
 
  -Original Message-
  From: LM [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 26, 2000 10:22 AM
  To: [EMAIL PROTECTED]
  Subject: Numberformat
  
  
  I need help with the NumberFormat function. I need to format 3 
 dollar sign
  values so that they are right aligned. The numbers vary in 
 length for ex:
  $199.99
   $15.99 
$5.99
  Is there a way to specify the number of digits to display at all times?
  Thanks for your help.
   
  
  
  
  Get free email and a permanent address at http://www.netaddress.com/?N=1
  --
  
  Archives: http://www.eGroups.com/list/cf-talk
  To Unsubscribe visit 
  http://www.houseoffusion.com/index.cfm?sidebar=stsbody=sts/cf_tal
  k or send a message to [EMAIL PROTECTED] with 
  'unsubscribe' in the body.
 
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 
 'unsubscribe' in the
 body.
 
 
 
 Get free email and a permanent address at http://www.netaddress.com/?N=1
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit 
 http://www.houseoffusion.com/index.cfm?sidebar=stsbody=sts/cf_tal
k or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRstsbodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: NumberFormat question

2000-04-29 Thread Dave Watts

 Anyone know why I would get a value of 0 in an input text
 field when I do this against a numeric column which has a
 null in the database?

 input type="text" name="testval" value="#NumberFormat("#varname#")"

ColdFusion doesn't recognize null as a value, so it converts it to an empty
string. The NumberFormat function converts the empty string to zero. That
shouldn't come too much as a surprise, because we expect the output of the
function to be numeric.

On a side note, you don't need to use so many pound signs and quotes. You
could do this instead:

input type="text" name="testval" value="#NumberFormat(varname)#"

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: NumberFormat question

2000-04-28 Thread Shane Witbeck

Is the database field itself defined as type "text" or "number" ?

Sincerely,

Shane Witbeck
Webmaster
[EMAIL PROTECTED]
www.digitalsanctum.com




-Original Message-
From: Lomvardias, Christopher [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 28, 2000 4:19 PM
To: ColdFusion Discussion List
Subject: NumberFormat question


Hi,

Anyone know why I would get a value of 0 in an input text field when I do
this against a numeric column which has a null in the database?

input type="text" name="testval" value="#NumberFormat("#varname#")"


Chris
--
Chris Lomvardias
[EMAIL PROTECTED]
Syscom, Inc.
400 E. Pratt Street, Suite 300
Baltimore, MD 21202
(410)539-3737 x1722 voice
(410)539-7302 fax
[EMAIL PROTECTED] (pager via email)
http://www.syscom.com/
--


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: NumberFormat

2000-04-25 Thread Fred Sanders

replace the nines after the comma with underscores.

i.e:
#NumberFormat('.28','___
_.__')#

Oh any reason you felt the need to submit the question 5 times, or did your
mail server just screw up??

- Original Message -
From: "Manam Suresh" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 24, 2000 2:32 PM
Subject: NumberFormat


 I am having problems with NumberFormat.
 The #NumberFormat('.28',
 '.99')# is giving
 2003764205190119424.00  as result.

 Is there any limit on the number parameter.

 Thanks
 Kumar

 --

 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: NumberFormat

2000-04-25 Thread Eberhart, Robert D

I think mail server is screwed up; I've been receiving multiple copies of
messages as well.

-Original Message-
From: Fred Sanders [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 25, 2000 10:46 AM
To: [EMAIL PROTECTED]
Subject: Re: NumberFormat


replace the nines after the comma with underscores.

i.e:
#NumberFormat('.28','___
_.__')#

Oh any reason you felt the need to submit the question 5 times, or did your
mail server just screw up??

- Original Message -
From: "Manam Suresh" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 24, 2000 2:32 PM
Subject: NumberFormat


 I am having problems with NumberFormat.
 The #NumberFormat('.28',
 '.99')# is giving
 2003764205190119424.00  as result.

 Is there any limit on the number parameter.

 Thanks
 Kumar

 --

 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.