How to turn seconds into minutes and seconds

How to turn seconds into minutes and seconds - Marathon Watch MSAR 41mm

I am making a racing minigame in Minecraft in 1.8.9 right now. I seem to have trouble how to figure out how to convert my existing setup into minutes and seconds. Let me explain:

I have an objective, best, which finds the best time of a player once they finish my course. After, the player can check to see if they have reached a personal best by pressing a button. This button just executes a tellraw command that says the objective. The problem is that best is in only seconds, so if their personal best is higher than 59 seconds, it will still display in seconds. How do I convert it to minutes and seconds?

Read the bold to save time and not die of boredom.



Best Answer

Adding a converter

Since you have one objective that has all the time in seconds, all you want to do is essentially subtract 60 seconds off of the objective and add a minute to a separate score for every 60 seconds. You can do this by adding a clock that does a /testfor to test if the player has at least a score of 60 for the objective best. You can get the output from that command using a comparator and, when that result is true, have two other command blocks that will subtract 60 seconds and add a minute to the player's score. The remaining seconds will be converted to bestsecond and the minutes will be bestminute. That's it!




Pictures about "How to turn seconds into minutes and seconds"

How to turn seconds into minutes and seconds - Black Analog Alarm Clock at 7:01
How to turn seconds into minutes and seconds - Gray Analog Clock Displaying at 10:36
How to turn seconds into minutes and seconds - Close-up of Watch Against Black Background



How do I convert seconds to minutes and seconds?

How to Convert Seconds to Minutes & Seconds
  • Divide the seconds by 60 to get the total minutes. Then, use the number to the left of the decimal point as the number of minutes.
  • Find the remaining seconds by multiplying the even minutes found above by 60. ...
  • Put the even number of minutes and seconds into the form MM:SS.


  • How do I convert seconds to minutes and seconds in Excel?

    In the formula bar, type =G4/86400 then press Enter. The seconds convert into minutes and seconds!...To apply this formula to the entire column:
  • Copy (Ctrl+C) the result in the first cell with the formula (H4 in my example).
  • Select the entire column (column H in my example) by selecting the column header.
  • Paste (Ctrl+V).


  • How do you convert seconds?

    The time in minutes is equal to the hours multiplied by 60.



    Converting Minutes to Seconds and Seconds to Minutes




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Mick Latter, Aphiwat chuangchoem, Krivec Ales, Felix Mittermeier