Version: 18.104.22.168 Arch Linux build-2
I need to make a database which display time as MM:SS.00 (swimming race time).
In Calc it’s very easy as there is a “Format” for that, but in Base I’ve seen that the “protocol” wouldn’t allow it because time is limited to the second, like if I entered 01:05.78, it would automatically become 1:05.00. MS Access do exactly the same, so this is why I’m talking about “protocol”. I’ve tried to connect Base with HSQLDB, MySQL (Direct, ODBC and JDBC), none is working
Even worse, if I manually put in the MySQL database 1:05.78, it would still display 01:05.00 in Base no matter what I do
So I have read in forums that I should import/enter the “race time” in Base as number (to still be able to do some numerical comparison) of seconds with two decimal as “double float” format and then format the display for the reports (would be great to be able to format in “Query” view but I doubt it would be possible), which is what I’m trying to do right now…
So the idea would be to convert (in a query, form or report) 65.78 seconds to 01:05.78. It’s swimming time, so the time won’t never be over 25 minutes.
I think it should be possible without macro with TimeValue(), CONCAT() and/or TRUNK() but I don’t know how to use them
In MS Access I’ve seen forums where it pretends to work with the Format() function:
FORMAT(Int([time_field]/3600),"00") & ":" & Format(Int(([time_field]-(Int([time_field]/3600)*3600))/60),"00") & ":" & Format((([time_field] Mod 60)),"00")
but this function is not available in LibreOffice, so I can’t test.