I have a type for listing a bunch of songs, and i need a field which will specify the duration of that song.
what “field type” should i use for that?
Example: 0:05:17 = This songs length is 5 minutes and 17 seconds
I have a type for listing a bunch of songs, and i need a field which will specify the duration of that song.
what “field type” should i use for that?
Example: 0:05:17 = This songs length is 5 minutes and 17 seconds
Number? And you store the length in seconds.
317 seconds.
Then you modulo 60 that number to get back to the minutes and seconds.
and then how do i display it for the user in the format i showed above?
I just told you. You use the mathematical modulo operator ![]()