emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Using Times in org-mode calc?


From: Xiao-Yong Jin
Subject: Re: [Orgmode] Using Times in org-mode calc?
Date: Wed, 21 Apr 2010 00:12:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux)

On Tue, 20 Apr 2010 12:03:29 -0400, David Frascone wrote:

> I'm trying to make a running log, but I can't seem to get times entered in 
> HH:MM:SS to work right.
> Well -- they work right, but I can't get things to re-display in that format. 
>  And, sometimes math is just screwy.

> For example:

>> Distance |     Time | Time    | Speed | Speed      |
>>   (Miles) | HH:MM:SS | Decimal | (MPH) | (Min/Mile) |
>> ----------+----------+---------+-------+------------|
>>       2.0 |    12:34 | 3:17    |       |            |
>>         3 |    30:45 |         |       |            |
>  #+TBLFM: $3=$2/2

> As you can see the 3:17 is some very strange calculation.  Not sure what it 
> did.  If I use "=$2", it returns 6:17

> It seemed like it was doing something wright, but, now it looks like maybe it 
> just doesn't understand HH:MM:SS format?

> What would be the easiest way to implement something like that table?  Lisp 
> functions? 

Calc uses `:' as a "fraction bar" to represent fractional
numbers.  So as a result,

  12      6
 ---- = ----
  34     17

I'm not sure what is the correct way to do it.  But I use a
cheap hack -- abuse the degree notation.  Calc understands
arc degrees as a form of address@hidden'00, that is 

    DEGREE @ MIN ' SEC

I use DEGREE field as hours, thus normal arithmetic works
out of the box.

Hope it helps.
-- 
J    c/*    __o/*
X    <\     * (__
Y    */\      <




reply via email to

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