I would like to show any give time in hours only.
Example:
Unix timestamp: 169200
Which is equal to 1 day and 23 hours…
But how can I convert this to hours so it shows 47:00:00 (47 hours)?
Thanks
Edit: It must show minutes and seconds too 😉
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A unix timestamp is a number of seconds. There are 60 seconds per minute, 60 minutes per hour. So to convert from seconds to hours, divide by
60*60 = 3600.If you need the minutes and seconds as well:
http://ideone.com/gFKv2