Thank you. This help my issue as well with displaying time. However, I'm having trouble getting it to calculate time correctly for a shifft that begins at 16:00 and ends at 24:00. The time sheet calculates (16.00) instead of (08.00). How can I get the form to calculate correctly. Below is the code in my form. Any assistance is greatly appreciated. Thanks! Janna
form1.detail.Totalhrs1::calculate - (FormCalc, client)
var amTime = 0
if (HasValue(amOut1) and HasValue(amIn1)) then
amTime = Time2Num(amOut1.formattedValue, "KK:MM") - Time2Num(amIn1.formattedValue, "KK:MM")
endif
var pmTime = 0
if (HasValue(pmIn1) and HasValue(pmOut1)) then
pmTime = Time2Num(pmOut1.formattedValue, "KK:MM") - Time2Num(pmIn1.formattedValue, "KK:MM")
endif
// compute total time in hours from the millisecond value
$.rawValue = Sum(amTime,pmTime)/3600000