Answer the question
In order to leave comments, you need to log in
Store and read lap times
Good time of the day.
There is a project dedicated to the game F1. There is a functionality for publishing lap records on the selected track.
The lap time of this format is 1:44.912 Tell me
how to store it correctly in mysql (now varchar) and how to calculate the difference, for example, with the result 1:39.004
Answer the question
In order to leave comments, you need to log in
Store in int
Calculate as 1:44.912=1000*60*1+1000*44+912 and vice versa accordingly.
The difference and the average and so on - is calculated very simply.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question