Convert number of seconds into HH:MM (without seconds) in Java
问题 I'm aware that you can use DateUtils.formatElapsedTime(seconds) to convert a number of seconds into a String with the format HH:MM:SS . But are there any utility functions that let me perform the same conversion but without the seconds? For example, I want to convert 3665 seconds into 1:01 , even though it's exactly 1:01:05 . In other words, simply dropping the seconds part. Would strongly prefer an answer that points to a utility function (if one exists) rather than a bunch of home rolled