
From:  Alexis Roda 
Subject:  Re: How to get hours from hh:mm 
Date:  Thu, 14 Jun 2007 21:06:31 +0200 
Useragent:  Mozilla Thunderbird 1.5.0.10 (X11/20070221) 
En/na Pascal Bourguignon ha escrit:
Cecil Westerhof <address@hidden> writes:Pascal Bourguignon wrote:Cecil Westerhof <address@hidden> writes:I have a table in orgmode with time needed to travel from A to B an the number of km. I would like to get the average speed. How do I convert a time? For example 0:45 becomes 0.75.How do you know that 0:45 becomes 0.75? How did you do it?I did not. I want. 0:45 is three quarters of an hour, so in mathematical notation 0.75.
Something like this could be helpful: (defun time100(time) (let ((timelist (splitstring time ":"))) (+ (stringtonumber (car timelist)) (/ (stringtonumber (cadr timelist)) 60.0)))) HTH
[Prev in Thread]  Current Thread  [Next in Thread] 