Help
Hi, how to convert for example 65.325s to min:ss.000
7 replies
-
Hi,
Suppose you have a numberfield 'TotalSeconds' that hold the ammount of seconds, then you can put this in a formula field:
let h := floor(TotalSeconds / 3600);
let m := floor((TotalSeconds - 3600 * h) / 60);
let s := TotalSeconds - h * 3600 - m * 60;
format(h, "00") + "h" + format(m, "00") + "m" + format(s, "00") + "s"Steven
-
Hi Steven, many thanks for your reply. It works, but not corect, because of misunderstanding format of time used. I will try to explain more precise. I have 3 x Time interval fields as ´Sector 1´ , ´Sector 2´ and ´Sector 3´ all are formated 1124182.002s (seconds and thousandhs of seconds). Field ´LapTime´is a formula field sum of (Sector 1, Sector 2, Sector 3). I need see in field ´LapTime´ not in format as have sectors, but converted in format mm:ss.000 (minutes seconds and thousandhs of seconds). Maybe you can find time to rewrite formula. Thanks in advance.
Dalius
-
Something like this:
---
let Ts := 'Sector 1' + 'Sector 2' + 'Sector 3';
let m := floor(Ts / 60);let s := Ts - m * 60;
format(m, "00") + "m" + format(s, "00,000") + "s"---
Steven
-
Something wrong
-
Are your Sector fields number-fields?
I have this:
-
I think it has something to do wih your Sector fields, are you using thousand seperator instead of decimal?
-
Yes, sectors are numberfields, I don´t use thousands separator, just number format is 3 digits (0.000). Maybe it is region setings problems, because working with ninox cloud version and using mac safari browser lot of users got date formating problems. Totaly lost. :(
Content aside
- 5 yrs agoLast active
- 7Replies
- 1149Views