Skip to Content
0
Former Member
Mar 24, 2009 at 02:27 PM

Calculating Time worked from begin hour and end hour in a Table

39 Views

Hi,

I'm trying to make a calculate event in a table row, but it doesn't work.

the calculation seems to work, but displaying the result in the last field of the row doesn't give the expected result.

the message Box gives the right value, but displaying the calculated in row doesn't work

xfa.host.messageBox(concat("n5 time resultaat naar $ ", $), "Debugging",3)

What is missing?

the code is the following.

var n3 = Time2Num(data.#subform[0].TRAVEL.Travel.#subform[1].Table3.Row1.end_time[*].formattedValue, "HH:MM:SS" )

var n4 = Time2Num(data.#subform[0].TRAVEL.Travel.#subform[1].Table3.Row1.start_time[*].formattedValue, "HH:MM:SS" )

var n5 = (n3 - n4) / 3600

$ = n5

xfa.host.messageBox(concat("n5 time resultaat n5 ", n5), "Debugging",3)

xfa.host.messageBox(concat("n5 time resultaat naar $ ", $), "Debugging",3)