This content has been marked as final.
Show 3 replies

1. Re: Calculating Time
gkaiseril Aug 24, 2008 3:09 PM (in response to (ForChristsSake))No. First one needs to convert the time string into some sort of numeric value so that one can perform basic arithmetic operations. And then one needs to convert the compute value back into a standard time string.
One can use the "Time2Nm()" function to obtain the number of seconds from the Epoch date, a standard start date and time for all date and time calculations within an application. One will also need to provide the correct format for the input time string so the date or time are properly interpreted. Once one gets the number of seconds for the start and end times, one only need perform a subtraction. To get the total time one needs to add all the individual time computations to obtain the total time. Then one needs to perform a division and use the "Floor()" function to obtain the whole hours and the "Mod()" function to get the minutes less than one hour. To format the result string one uses the "Concat()" function to combine the hours the ":" and the minutes. 
2. Re: Calculating Time
gkaiseril Aug 24, 2008 7:35 PM (in response to (ForChristsSake))Sorry, the return value is in milliseconds. 
3. Re: Calculating Time
(Gloria_Phillips) Sep 11, 2008 8:17 AM (in response to (ForChristsSake))I am new to using functions in LiveCycle. I feel that I am quite competent with excel but I am a little confused by your answer. I am trying to subtract a start time from and end time using the date/time field. Have table with four columns "Day" "Start Time" "End .." "Total Time" and seven rows (Days of week). I understand what you are saying about converting the time to seconds then subtracting the end and start seconds and then converting so output is in hours and minutes. I just do not know how to set up the formula. Do I need more columns for calculations? Can I hide the calculations? Any help would be appreciated.
Thanks,
Gloria