11

I'm trying to figure out how to to use org-mode to calculate the duration between two time points, however, whilst I figured out how to do it for two separate dates, when I add in the time component, it gives an answer, but I'd rather have the answer in

XX days, xx hours, xx minutes

 | Start                  | End                    | Duration |
 |------------------------+------------------------+----------|
 | <2013-07-16 Tue 15:15> | <2013-07-17 Wed 11:15> | 0.833333 |
 |                        |                        |        0 |
   #+TBLFM: $3=(date(<$2>)-date(<$1>))

1 Answer 1

13

You may use the T flag to use the form HH:MM[:SS]. Example:

| Start                  | End                    |     Days | HH:MM:SS |
|------------------------+------------------------+----------+----------|
| <2013-07-15 Tue 10:15> | <2013-07-17 Wed 11:15> | 2.041667 | 49:00:00 |
|                        |                        |        0 | 00:00:00 |

#+TBLFM: $3=date(<$2>)-date(<$1>)::$4=60*60*24*$3;T

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.