- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I've attached an updated version of your form.
Time calculations are always a little tricky, and it's one of the areas that I wish Adobe would handle a little better. In this case I've assumed that you are using 24-hour time formats. Calculating the difference is a little tricky, since your runs can span midnight and the end time value will be smaller than the start time. The easiest method is pretty unsophisticated: calculate the hours and minutes separately, and adjust if the times span midnight.
In the attached form I've done the first column for you. There is new javascript in the TotalTime910 cell Calculate event. You should be able to copy that script and paste it into the Calculate event for the other TotalTime cells; the only change that you'll need to make is to change where the startTime and endTime values are extracted. For example, for the TotalTime911 cell you'll use the Row2.enroute911 and Row6.InService911 fields.
Remember to change the Language dropdown to JavaScript when you paste into each event.
Also, I changed the cell patterns for the cells in the 910 column to: null{}|num{9999}. This will display the values in proper 24-hour format, e.g. 0200 for 2am. If that works for you, copy the pattern to the other cells in the table. I eliminated the zero{} pattern since it causes midnight to be displayed as a blank; it should be displayed as 0000.
Finally, this all falls apart if you're on-scene longer than 24 hours. In that case you'll need dates as well as times to make it work. Hopefully nothing in your city will burn that long.
Views
Replies
Total Likes