You could try it in SQL in different ways:
SELECT "Number", "Length", "Number" * "Length" AS "Duration" FROM "Tablename"
You will get the result in seconds.
Next way is to do the same as in Calc:
SELECT "Number", "Length",
"Number" * "Length" *1.0000000000/(60*60*24) AS "Duration" FROM "Tablename"
You will get the duration as a decimal value. Note you have to multiplicate with something like 1.0000000000 to get enough decimal places. Without this you won’t get any decimal places and the duration will be 0. You could use this value in a formatted field, formatted as time.
And there is another way to get the “time” as string. This is nice to see, but you couldn’t calculate with this time any more.
SELECT "Number", "Length",
"Number" * "Length" / 3600 AS "Hours",
MOD("Number" * "Length", 3600) / 60 AS "Minutes",
MOD(MOD("Number" * "Length", 3600), 60) AS "Seconds",
FROM "Tablename"
This query shows the hours, minutes and seconds in different columns. You could concatenate this with ||':'||
to a string, which shows the time as text. But you have to set 2 leading ‘0’ for the minutes and cut the string after 2 characters from the right. If you won’t do you will get something like 8:1:0, which isn’t really what you want.