Christian Moe <m...@christianmoe.com> writes: > Hi, > > If we're not just looking for a neat workaround for some special cases > anymore, but looking at making org-tables aware of time-like strings > by default, a better strategy than to convert them into integers might > be to translate them into Calc time format and back again. > > After all, Calc and hence the Org spreadsheet already handles time > arithmetic perfectly well, it's just that it would be nice to have > this functionality with the extra option to enter and display times as > =12:45= rather than =12@ 45'= or =12h 45m=. >
I did not realize that calc (and hence Org) already supported operating on time values. The =7@ 30'= format does indeed work well for time table formulas (although the =12h 5m= format does not), e.g., | 1@ 20' | 2 | 0@ 40' 0." | | 2@ 5' | 3 | 0@ 41' 40." | #+TBLFM: $3=$1/$2 Maybe all that is needed is explicit mention of this syntax somewhere in the table section of the Org-mode manual. The only remaining reason to support a %d:%d time format is that it is what I (and I expect most users) would first think of to represent time, and supporting such a format would allow time calculation in a table to "just work" -- meaning users could likely manipulate time without having to first look in the manual for the appropriate Calc format. However as Carsten mentioned such an automatic translation of e.g., =7:20= to =7@ 20'= would be a bit bold, and (as mentioned elsewhere) it would result in having to make some denomination decisions, namely does =7:20= convert to =7@ 20'= or =7' 20"=. For now I've posted my `with-time' macro up to Worg. Cheers -- Eric