emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to calculate a vector (list) of time durations in tables?


From: Fr Ml
Subject: How to calculate a vector (list) of time durations in tables?
Date: Fri, 9 Apr 2021 00:43:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0

Hello,

I have a problem with the calculation of time durations in tables. I hope someone can help me.

*How to calculate a vector (list) of time durations in tables?*


Subtraction of numerical vectors works directly:
```
| day              | t1       | t2       | differences |
|------------------+----------+----------+-------------|
| [2021-04-08 Thu] | [10, 13] | [16, 18] | [6, 5]      |
#+TBLFM: $4=$3-$2
```

Using this with time vectors to compute durations) doesn't work. It computes only the first item:
````
| day              | time 1         | time 2         | durations |
|------------------+----------------+----------------+-----------|
| [2021-04-08 Thu] | [10:45, 14:00] | [12:00, 15:00] |     01:15 |
#+TBLFM: $4=$3-$2;U
````
I would expect this:

````
| day              | time 1         | time 2         | durations     |
|------------------+----------------+----------------+---------------|
| [2021-04-08 Thu] | [10:45, 14:00] | [12:00, 15:00] | [01:15, 1:00] |
````

I hope there is an (easy) solution (?)

Best Regards
Frank


reply via email to

[Prev in Thread] Current Thread [Next in Thread]