I currently store various metadata about the video, and one of these data bits is the length of the video.
So, if the video lasts 10 minutes 35 seconds, it is saved as โ10:35โ in the database.
But what I would like to do is get a list of videos by length (longest, shortest).
The problem I am facing is that if the video is "2:56", it becomes the longest because the number 2 is greater than the number 1.
So, how can I sort the data based on this length field to recognize โ10:35โ as longer as โ2:56โ (as in my example)?
source share