Page 1 of 1
Dollar Formatting
Posted: Thu Dec 24, 2009 7:55 pm
by lohill
If I have a variable that is a number like 43267.246, is there a variation of the format function that allows me to format it as $43,267.25? I could probably parse it out with a home made function but it would add overhead to the process.
Thanks,
Larry
Re: Dollar Formatting
Posted: Thu Dec 24, 2009 8:54 pm
by Mark
Hi Larry,
On this forum and in the archives of the Use Mail List, you'll find several ways to solve this problem. Just use the search features.
I haven't checked whether it actually works, but one of the many, many examples can be found
here.
Best,
Mark
Re: Dollar Formatting
Posted: Thu Dec 24, 2009 10:23 pm
by whelkybaby
Hi Larry,
I've written a function that may suit your needs.
Take a look at
http://theworcestersource.com/downloads ... fault.aspx and click on the download link for
accountancyFormat().rev.
Hope that helps.
Cheers,
Steve
http://www.theworcestersource.com
Re: Dollar Formatting
Posted: Fri Dec 25, 2009 12:29 am
by lohill
Thanks Mark,
The routine you pointed me to will work very nicely. I had hoped there was a simple way rather than having to parse all the characters and do it myself. I'll be able to clean up what I saw to work just fine. My concern is that I don't want to burden down REV with unnecessary overhead. Do you find that it is as 'industrial strength' as advertised? Back in my HyperCard days I seem to remember concerns about slowing down the application with too many calculations.
You also mention the 'Use Mail List'. What is that and how do I access it? I'm getting acquainted with the Dictionary, The Resource Center and this Forum but searches through them for 'dollar' didn't yield much.
Best Regards,
Larry
Re: Dollar Formatting
Posted: Fri Dec 25, 2009 7:44 pm
by Mark
Larry,
Searching for "dollar" doesn't make sense, since the dollar is only one of many currencies and the script you need isn't just about dollars, not even necessarily about money.
You can subscribe for the use list
here.
Best,
Mark