Avatar

Level 10

Hi,

the calculation of time differences is not trivial.

A few rules to know:

1: For the total hours you should not use a date/time field - use a text field instead.

It's because the date/time field will only accept values within a 24 hours time frame.

Larger values will cause unexpected results.

2: The times are calculated in milliseconds.

3: The times needs to be converted from their formattedValue into milliseconds using the Time2Num() method to be comparable.

Here's a similar solution I posted a while ago.

You can adapt this to your own needs.

http://forums.adobe.com/message/4054814#4054814