From mboxrd@z Thu Jan 1 00:00:00 1970 From: gmx Subject: Adding times in a table Date: Sat, 21 Sep 2019 19:06:44 +0200 Message-ID: <4b015484-3492-14af-9d0b-0dd56dc27f4d@gmx.fr> References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------6C4FD33C6E1D34BECE4D2DC9" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50328) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBiqV-00064c-03 for emacs-orgmode@gnu.org; Sat, 21 Sep 2019 13:06:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBiqT-00016h-QM for emacs-orgmode@gnu.org; Sat, 21 Sep 2019 13:06:54 -0400 Received: from mout.gmx.net ([212.227.17.20]:36513) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBiqT-00012o-DB for emacs-orgmode@gnu.org; Sat, 21 Sep 2019 13:06:53 -0400 Received: from [192.168.0.43] ([78.211.104.2]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MXp9Y-1ihZ4E3B9w-00YCBf for ; Sat, 21 Sep 2019 19:06:46 +0200 In-Reply-To: Content-Language: fr List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------6C4FD33C6E1D34BECE4D2DC9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi, I've a table like this one : Time for each task 1 00:53 2 03:12 Total 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=3Dvsum(@2$2..@3$2). Result : 1:4 Each of these times are calculated by org-mode for a given task. I don't know if it's possible that they could be imported directly into the table: you'll tell me about it. Thank you much Fred (real newbie with org-mode), --------------6C4FD33C6E1D34BECE4D2DC9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Hi,

I've a table like this one :



Time for each task
1
00:53
2
03:12
Total


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 :=C2= =A0 #+TBLFM: @>$2=3Dvsum(@2$2..@3$2). Result : 1:4

Each of these times are calculated by org-mode for a given task. I don't know if it's possible that they could be imported directly into the table: you'll tell me about it.

Thank you much

Fred (real newbie with org-mode),


--------------6C4FD33C6E1D34BECE4D2DC9-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fraga, Eric" Subject: Re: Adding times in a table Date: Sun, 22 Sep 2019 16:46:23 +0000 Message-ID: <8736goqnxd.fsf@ucl.ac.uk> References: <4b015484-3492-14af-9d0b-0dd56dc27f4d@gmx.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56256) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC50F-0008Tv-Rc for emacs-orgmode@gnu.org; Sun, 22 Sep 2019 12:46:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC50E-0004d7-PW for emacs-orgmode@gnu.org; Sun, 22 Sep 2019 12:46:27 -0400 Received: from mail-eopbgr70095.outbound.protection.outlook.com ([40.107.7.95]:42244 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iC50E-0004cR-Eg for emacs-orgmode@gnu.org; Sun, 22 Sep 2019 12:46:26 -0400 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: gmx Cc: "emacs-orgmode@gnu.org" 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=3Dvsum(@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=3Dvsum(@I..@II) #+end_src --=20 Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d