How I do I aggregate or perform calculations on a time datatype in "MM:SS:MS" in MySQL?
0
votes
2
answers
83
views
I'm currently working on an NBA project and I need to take the average minutes played per player, but I have no idea how to aggregate or calculate the time datatype.
I know you have to convert it, but I have no idea what to covert it to.
For example: a value is 31:56:00, but when I use calculations on it, it becomes 315600 as an integer, instead of remaining as that datatype with minutes, seconds, milliseconds. I apologize if this has been answered, but I can't find any solutions online and I'm still learning the fundamentals of MySQL.
Edit:
Here's a screenshot of the data and I'll show what happens if I perform a calculation or an aggregate, it'll basically remove the colons and keep it as an integer, but I want it to remain in the same format.


Asked by thisisforfun
(1 rep)
Jul 12, 2023, 01:47 AM
Last activity: Jul 12, 2023, 08:21 PM
Last activity: Jul 12, 2023, 08:21 PM