日数を時間数に変換する
日数を時間数に変換する
秒数を判読可能な時刻形式(時:分:秒)に変換します。秒数を入力すると、フォーマットされた時刻が表示されます。
Convert seconds to a readable time format (hours:minutes:seconds). Enter the number of seconds to get the formatted time.
In this example, we convert 1 second, 60 seconds, and 3600 seconds to clock format. We don't use the zero-padding option and get three simple output values – 0:0:1 for 1 second, 0:1:0 for 60 seconds (1 minute), and 1:0:0 for 3600 seconds (1 hour).
In this example, we enable the padding option and output digital clock time in the format HH:MM:SS. The first two integer timestamps don't contain a full minute and the third timestamp doesn't contain a full hour, there we get zeros in the minutes or hours positions in output.
The values of all input seconds in this example are greater than the number of seconds in a day (86400 seconds). As our algorithm doesn't limit the time to just 23:59:59 hours, it can find the exact number of hours in large inputs.