From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Welle Subject: Re: Calc: Multiply time (hours) with a float Date: Mon, 19 Sep 2016 08:49:05 +0200 Message-ID: <874m5cs7tq.fsf@luisa.c0t0d0s0.de> References: <2016-09-08T10-32-27@devnull.Karl-Voit.at> <2016-09-11T13-43-22@devnull.Karl-Voit.at> <87oa3u1vpn.fsf@luisa.c0t0d0s0.de> <2016-09-18T18-32-24@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blsOB-0007go-7M for emacs-orgmode@gnu.org; Mon, 19 Sep 2016 02:49:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blsO6-0007NA-0j for emacs-orgmode@gnu.org; Mon, 19 Sep 2016 02:49:13 -0400 Received: from mout.gmx.net ([212.227.15.15]:50519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blsO5-0007Mx-M0 for emacs-orgmode@gnu.org; Mon, 19 Sep 2016 02:49:09 -0400 Received: from stella.c0t0d0s0.de ([88.66.7.109]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LuP5z-1b1vIT3kcJ-011gK4 for ; Mon, 19 Sep 2016 08:49:06 +0200 Received: from Stella (stella.c0t0d0s0.de [192.168.42.1]) by stella.c0t0d0s0.de (Postfix) with ESMTP id BC87DC4264 for ; Mon, 19 Sep 2016 08:49:05 +0200 (CEST) In-Reply-To: <2016-09-18T18-32-24@devnull.Karl-Voit.at> (Karl Voit's message of "Sun, 18 Sep 2016 18:36:19 +0200") 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 Hello, Karl Voit writes: > * Michael Welle wrote: [...] > ... which is working: > > | time [h:m:s] | value | hours [float] | product | > |--------------+---------+---------------+-----------| > | 09:15:00 | 2.54321 | 9.25 | 23.524693 | > > #+TBLFM: $4=$2*$3::@2$3='(org-time-string-to-hours $1) > > However, when I try to calculate the product in one step, I get an error: > > | time [h:m:s] | value | product | > |--------------+---------+---------| > | 09:15:00 | 2.54321 | #ERROR | > > #+TBLFM: @2$3='(* $2 (org-time-string-to-hours $1)) > > When I replace "$2" in TBLFM with an integer value, it works. > > How can I calculate the product in /one/ step? chapter 3.5.3 of Org's info manual might be of interest here. I haven't fully 'inhaled' it, but like this should work: #+TBLFM: @2$3='(* $2 (org-time-string-to-hours "$1"));L Regards hmw