AnneG
Novice

convert sum of numbers to display as hours and minutes

Hi all,

 

How do you display the sum of numbers as hours and minutes. e.g. sum is 90 so this should display as 1.30.

 

Thanks

0 Kudos
Reply
5 Replies
Andrew_Blinco
Apprentice

Re: convert sum of numbers to display as hours and minutes

Hi Anne

 

You can do this with an expression. I have attached a package with an example. Enter a number in the text box and it will convert it to a time value in the data label.

 

 

2386i137A0CEFC1560340.png

0 Kudos
Reply
AnneG
Novice

Re: convert sum of numbers to display as hours and minutes

Thank you, it worked :)

0 Kudos
Reply
AnneG
Novice

Re: convert sum of numbers to display as hours and minutes

Hi Andrew,

 

I did the following, but when I put in 65 minutes, it comes with 1.50 instead of 1.05.

 

I have attached my expression below.

 

Thanks

 


totaltime_1749.png
0 Kudos
Reply
Andrew_Blinco
Apprentice

Re: convert sum of numbers to display as hours and minutes

Hi Anne

 

Try the following - this will pad the result of the modulo to 2 places.  I tried to use FormatNumber with D2 as the parameter but this doesn't seem to work.

 

2433i9365B7BCB7AB8D56.png

0 Kudos
Reply
AnneG
Novice

Re: convert sum of numbers to display as hours and minutes

Thanks Andrew, that worked :)

0 Kudos
Reply