Transforming seconds into hours
Solved/Closed
Dédé86
-
Rubi -
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
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 réponses
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...
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...
emi
Thanks a lot. One year late but I'm using it for my business.
johan
Easy for you, isn't it?