with a simple
Code: Select all
select job,Price from t_order
The Output from the select is:
AUM7759 7.78000000000000
What is to do that the output is AUM7759 7.78?
Stef
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
select job,Price from t_order
Code: Select all
set the numberFormat to "#.00"
select job,Price from t_order[
Code: Select all
put revDataFromQuery(tab,return,connID,sql_test) into t_array["vkpreise"]
Code: Select all
set the numberformat of t_array["vkpreise"] to "#.00"
Code: Select all
...
put 1 into ttt
set numberformat to "x.xx"
## FORCE the neccessary math:
add 0 to ttt
put ttt
## -> 1.00
...
Code: Select all
...
put 1 into ttt
## This will FORCE 2 decimal places:
put format("%1.2f",ttt)
## -> 1.00
...
to solve this problem in e.g. german apps see: http://www.livecode-blog.de/forums/topi ... -addieren/
Really?englisch decimal delimiter
Now I understand why the Anglo-Saxons left northern Germany and moved to England:Yes, really!
Example:Klaus wrote: ↑Sat Jun 02, 2018 12:11 pm
Better use the format() function, but you need to apply this to all of your neccessary values separately:Code: Select all
... put 1 into ttt ## This will FORCE 2 decimal places: put format("%1.2f",ttt) ## -> 1.00 ...
Code: Select all
put t_array["vkpreise"] into ttt
put format("%1.2f",ttt)
is this a question?ace16vitamine wrote: ↑Fri Jun 08, 2018 6:00 pmAnd now I have no Idea how i can format it human readable