7 Replies Latest reply: Jul 10, 2013 9:05 AM by Luiz Henrique

# Convert decimal to hours

I have a field (RmoQuantid) this field contains hours used by an employee to perform a task, the time value is in decimal, how to convert hours?

Example:

1.50 to 1:30

• ###### Re: Convert decimal to hours

I would do it like this:

=interval(interval#(1.5*60, 'm'),'h:mm')

-Rob

http://robwunderlich.com

• ###### Re: Convert decimal to hours

I am having difficulty in setting up the command syntax, the first time that I see with this problem, can you help me, where the field name should be?

• ###### Re: Convert decimal to hours

would be to solve this problem:

Where the value is 47.89 should be 47:53 Hours

• ###### Re: Convert decimal to hours

I'm still having problems did not work, look at the expression used:

div (sum (Aggr (sum (QUANTIDADE_RMO) COD_FUNC_RMO%)), 60)
& ':' &
Mod (Sum (Aggr (sum (QUANTIDADE_RMO) COD_FUNC_RMO%)), 60)

She returns the time but not behind the minutes as shown in the picture

Hours decimal 47.89 ought bring 47:53 Hr

hours are converted into script

• ###### Re: Convert decimal to hours

Hi Henrique,

Try dividing the field containing the hours by 24 and enclose your calculation it in the Interval() function like this:

interval(sum(hours/24), 'hh:mm')

See attached QVW example.

Borja.

• ###### Re: Convert decimal to hours

Thank Borja Rodríguez, worked

I appreciate