×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

(OP)
Hi,

How would I remove all the spaces between the $and number after being transformed? One or two spaces is preferred. I need to reclaim the space as this field is taking up too much space on a report and other places. And, it's not an issue when using large numbers as the spaces gets filled up with numbers. I know that I can count the chars in the value and use a case statement to build a matching transform, but I'm hoping for something more generic. Thanks, Stanley RE: Trimming the Dollar Sign in Transform Reduce() of Foxtools.fll does that- CODE Set Library To Foxtools.fll additive Clear ab = 123.45 ? Reduce(Transform(ab,'$999,999,999.99')) 

And an even simpler solution is to let Transform act without your help, just adjust the number of decimal places with SET DECIMALS TO 2 and use

CODE

Set Decimals To 2
Clear
ab = Cast(1234.56 as Currency)
? Transform(ab) 
That prints the value with currency symbol and 1000s separator because it's the type currency.

Chriss

(OP)
Thanks Chris, exactly what I needed...
Stanley

3
A simpler solution is to put two (or more) dollar signs at the front of the mask in TRANSFORM():

CODE -->

Transform(ab,'999,999,999.99')

Tamar

Impressed, I didn't know that feature.

Chriss

Hi,

Unfortunately it only works with the $sign -$€ or $£ or any other combination of$x is not working. You may of course use @$to show the local currency. CODE --> y = 250 SET CURRENCY RIGHT ?TRANSFORM(y, "@$999,999")
SET CURRENCY LEFT
?TRANSFORM(y, "@$999,999")  hth MarK RE: Trimming the Dollar Sign in Transform Quote: You may of course use @$ to show the local currency.

Or, more accurately, to show the symbol specied by SET CURRENCY TO [cCurrencySymbol].
.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Hi Mike,

Of course!

MarK

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!