Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format amount field

Status
Not open for further replies.

eyetry

Programmer
Oct 2, 2002
560
US
For various reasons, I don't want to change my tree. Anyone know the rule syntax that formats an amount field?

For dates it would be fromdatetime(currentdate(),"{CCYYMM}")

I can't get the rule right to force a 2 position 'cent' field. The trailing zeros get truncated.... for example

50 should be 50.00
50.1 should be 50.10

This seems like a really dumb question.
 
this was a duh... using 'Round' took care of it.
 
i don't know your mercator version, but try :

Greeting="You are caller number"+FROMNUMBER(SeqNo:.:History,"{#','###}")+"!"

If the value of SeqNo is 2348192, this rule evaluates to "You are caller number 2,348,192!"

"$" + FROMNUMBER(CurrentRate Field:.:Schedule, "{#','###'.'2##2}")

If the value of CurrentRate Field is 15.875, this function will return "$15.88".

If you need to keep number do not forget to apply TEXTTONUMBER around.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top