Re: Calc/TBLFM: how to conditionally insert hours:minutes?

2023-09-25 Thread Chris Keschnat
Hi Bruno, > You could switch to the "Lisp" syntax (as opposed to the "Calc" syntax), > and, write the conversion manually: > > | 19:55:00 | > | 40:01:00 | > | 40:01:00 | > > #+TBLFM: $1='(org-table-time-string-to-seconds (if (<= @# 1) "19:55" > "40:01"));T awesome, thank out.

Re: Calc/TBLFM: how to conditionally insert hours:minutes?

2023-09-25 Thread Bruno Barbier
Hi Chris, Chris Keschnat writes: > > | 19:55:00 | > | 00:00:40 | > | 00:00:40 | > #+TBLFM: $1=if(@# <= 1, 19:55, 40:01);T > > What would be the correct way to do this? > It seems that org tries to convert times back and forth when evaluating formulas; but, in your case, it cannot convert

Calc/TBLFM: how to conditionally insert hours:minutes?

2023-09-23 Thread Chris Keschnat
Hi, I am trying to understand how to set hours:minutes values in tables conditionally. Just setting hours directly works: | 40:03:00 | | 40:03:00 | | 40:03:00 | #+TBLFM: $1=40:03;T But when doing that conditionally (first row different from the others), I do not understand the behavior: