Transforming seconds into hours

Solved/Closed
Dédé86 -  
 Rubi -
Hello,

I am making a small program in Just Basic and my question is more about logic and mathematics than programming:
how to convert a time that is in seconds into hours?

example: 2523 seconds

Thank you in advance

2 answers

  1. Amo
     
    easy, it's the number of seconds since midnight. So:
    ex: 56123 = ??
    you divide by 3600, it gives you 15.589 so 15h
    you round the remainder to 0.59 which you then multiply by 60 to get the minutes which is 35.4, rounded down - 35
    56123 = 15h35
    QED;;;with a year delay but oh well...
    503
    1. emi
       
      Thanks a lot. One year late but I'm using it for my business.
      0
    2. johan
       
      Easy for you, isn't it?
      1