[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Calc: Multiply time (hours) with a float
From: |
Michael Welle |
Subject: |
Re: [O] Calc: Multiply time (hours) with a float |
Date: |
Mon, 19 Sep 2016 08:49:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello,
Karl Voit <address@hidden> writes:
> * Michael Welle <address@hidden> 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
- [O] Calc: Multiply time (hours) with a float, Karl Voit, 2016/09/08
- Re: [O] Calc: Multiply time (hours) with a float, Karl Voit, 2016/09/11
- Re: [O] Calc: Multiply time (hours) with a float, Michael Welle, 2016/09/11
- Re: [O] Calc: Multiply time (hours) with a float, Karl Voit, 2016/09/18
- Re: [O] Calc: Multiply time (hours) with a float,
Michael Welle <=
- Re: [O] Calc: Multiply time (hours) with a float, Michael Welle, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Karl Voit, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Michael Welle, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Karl Voit, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Michael Welle, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Nick Dokos, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Michael Welle, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float, Karl Voit, 2016/09/20
- Re: [O] Calc: Multiply time (hours) with a float, Bernhard PrĂ¶ll, 2016/09/19
- Re: [O] Calc: Multiply time (hours) with a float - solved by updating Org, Karl Voit, 2016/09/20