emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Fraga, Eric" <e.fraga@ucl.ac.uk>
To: gmx <fredstev@gmx.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Adding times in a table
Date: Sun, 22 Sep 2019 16:46:23 +0000	[thread overview]
Message-ID: <8736goqnxd.fsf@ucl.ac.uk> (raw)
In-Reply-To: 4b015484-3492-14af-9d0b-0dd56dc27f4d@gmx.fr

On Saturday, 21 Sep 2019 at 19:06, gmx wrote:
> Which formula should I use to obtain the result (hh:mm) of the sum of
> the times in the last cell of column 2? I tried this one : #+TBLFM:
> @>$2=vsum(@2$2..@3$2). Result : 1:4

The underlying calculations are done using the Emacs Calc system.  In
this system, : is used to represent ratios.  If you want hours, minutes,
seconds, you need to use a different syntax.  For instance, your table
could look like this:

#+begin_src org
  |-------+----------|
  |     1 | 0@ 53'   |
  |     2 | 3@ 12'   |
  |-------+----------|
  | Total | 4@ 5' 0" |
  ,#+TBLFM: @3$2=vsum(@I..@II)
#+end_src

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d

      reply	other threads:[~2019-09-22 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.41.1569081606.23821.emacs-orgmode@gnu.org>
2019-09-21 17:06 ` Adding times in a table gmx
2019-09-22 16:46   ` Fraga, Eric [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736goqnxd.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=fredstev@gmx.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).