View Single Post
Old 10-12-2024, 05:56 PM   #723
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,463
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Arithmetic - how do I apply a format to the results?

e.g. program: divide($$#purchasecost, 1.15) returns 7.9913043478260875 when I just need 7.99. ({0:,.2f})
Use format_number(x, '.2f') or perhaps finish_formatting() if you want a prefix and/or a suffix.

Also, $$#purchasecost/1.15 is faster than using the divide() function.
chaley is offline   Reply With Quote