Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Milliseconds handling in MariaDB

Calculating results including milliseconds for sport events like swimming



10:49 pm on Apr 20, 2013 (gmt 0)

Not sure where to post this, I chose the Database section.

I'm working on a simple personal training schedule script, that athletes like swimmers can use for planning.

But in such sports, results are recorded in milliseconds so it is of great importance, only it appears that this is poorly supported in SQL - or am I just looking the wrong place?

I've found numerous tips on how to create workarounds in PHP but is there really no native SQL way of handling such events?

A table could look like this
(finishing time being minutes:seconds:milliseconds):
| event_id | heat_id | athlete_id | finishing_time |
| 201304011 | 101 | 19991203-12 | 01:23:45 |

How is such time result entered most correctly?

Thanks in advance :)


10:40 am on Sep 15, 2013 (gmt 0)

No replies :(, so I figured I'd better do some research. And it appears that it is not all that difficult: [forums.mysql.com...]
SEC_TO_TIME() does the trick.

Featured Threads

Hot Threads This Week

Hot Threads This Month