 # Decimal & Number conversion

Hello.
I have been trying to place a formula that does a mathematical calculation in the “Auto Compute” section.

The column values that are related in the calculation are some decimals and some time and duration values.

I have seen that by adding the expression “Number([column value)]” or "Decimal ([value]) you can convert certain types of columns to other values to perform calculations.

((([NIVEL_11] - [NIVEL]) * [TK]) / DECIMAL([TOTAL HS])) * 24

in other way is

DECIMAL - DECIMAL * DECIMAL / TIME * 24

The problem I have experienced is that when I try to use "Decimal([TimeValue]) with a time or duration value, it does not work correctly. It blocks the mathematical calculation I am trying to do and does not reflect any value in the column in which I am inserting the Auto Compute Value.

I have been reading your support and guides… Any idea why this works like this?

I tried both “Initial Value” and “App Formula” and I got the same results: the calculation does not work.

`DECIMAL( [time-value] )`
is not a valid expression.

You should use HOUR(),MINUTE(),SECOND(),etc.

2 Likes

Thanks, i know that.

My issue is trying to convert from Time value to Decimal for build this formula

((DECIMAL - DECIMAL) * DECIMAL) / TIME * 24

All values are Decimal but “Time” is column type time so i cant build up the Formula.

…to convert the Time value into whatever decimal value you want.

e.g. HOUR([time]) + MINUTE([time]) / 60.0…

2 Likes
1 Like