Convert a numerically string into a decimal

Convert a numerically string into a decimal

Hello,

I have a problem, converting a decimal like

durations_of_days = 1.7825321

into a rounded decimal with the result of 1.78

In ZOHO Creator this works:

durations_of_days_string = "" + (durations_of_days * 100).getPrefix(".")

-> result: durations_of_days_string = 178

But in ZOHO Creator, for example, this does not work:

durations_of_days_rounded_decimal = (0.0 + durations_of_days_string) / 100

-> result: durations_of_days_rounded_decimal = 1.78

or perhaps

durations_of_days_rounded_decimal = durations_of_days_string.getNumeric / 100

-> result: durations_of_days_rounded_decimal = 1.78

But all the last two commands are science fiction!

In ZOHO Creator there is no possibility to convert a string like "178" into the number of 178, or?

How can I convert a numerically string into a number?


Yours sincerely

Dieter H. Herold
alias webtiwi

from the good old Germany