Calculating the duration between two time fields (in hours)

Asked by oskar

If I have two fields like: 8:00:00 AM and 12:00:00 PM How do I let OO calculate the duration? Something like the DAYS function would be convenient... only for hours.
Of course in this case it should be assuming that the duration is less than 24 hours. - It should also regard a duration between 19:00:00 PM and 02:00:00 AM as legal (The only function I could come up with did not do that).

I wouldn't mind if I had to enter the date also.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
oskar
Solved:
Last query:
Last reply:
Revision history for this message
oskar (oskar669) said :
#1

Solved it myself... Apparently I got something wrong with either the syntax or the AM/PM thing.

=HOUR([start time]-[end time])

does it.