Convert seconds to hours

  • Thread starter turks67 via AccessMonster.com
  • Start date
J

Jeff Boyce

How many seconds are in one hour?

Divide your number by that number.

Where are you trying to do this?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
T

turks67 via AccessMonster.com

I'm trying to do this in a query.What if the number of hours are over 24.
 
J

John W. Vinson

How do I convert (226942) seconds to hours?

Divide by 3600: 226942/3600 = 63.0394444444 hours.

If that's not the answer you want please explain.
 
J

John W. Vinson

What I'm I doing wrong? It's only giving me 15:02 hours.

You're formatting it as a date/time instead of as a number.

You asked for hours. You didn't ask for hours <colon> minutes date/time
format!

If that's what you want, try

[seconds] \ 3600 & ":" & Format([seconds] \ 60 MOD 60, "00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top