Addition of Two Value in Time Format (0-60)

I wanted to add time in Ignition project.

I have Numeric Text field and entering decimal value to this. I am trying to add 0.47 and 0.32. The end result is 0.79. But I wanted to convert the same into time(0-60) and the answer supposed to be 1.19. How can I make this…

There are a number of ways to do this, depending on what you’d like to do with the result. The script below gives a couple of suggestions that might get you going:

[code]a = 0.47
b = 0.32

treat a+b as numbers, faux mod 0.60

temp = 0
sum = a+b
while sum >= 0.60:
temp = temp + 1
sum = sum - 0.60

temp = temp + sum
print a,"+",b,"=",temp

treat a + b as time

from datetime import timedelta
t1 = timedelta(minutes=(a100))
t2 = timedelta(minutes=(b
print t1,"+",t2,"=",t1+t2[/code]

The output of this is 0.47 + 0.32 = 1.19 0:47:00 + 0:32:00 = 1:19:00

Thanks for your update.

How do i apply the same in screen or using Sql Tags. Because these are neither expression nor query.

Can you tell me step by step after i enter a (0.47) & b (0.32) values through normal Numeric Text filed.

Maybe an expression tag like this?

toInt((({[.]a}+{[.]b})*100)/60) + ((({[.]a}+{[.]b})*100)%60)/100