Converting Seconds

  • Thread starter MichelleM via AccessMonster.com
  • Start date
M

MichelleM via AccessMonster.com

I have looked through many, many posts and I have not been able to find an
answer to my question, so here it goes....

I have a report that tracks how long a person was in a certain phone state
[StateDuration]. The sum displays in seconds, I want to convert the seconds
to HH:MM:SS. The control source I'm currently using is:

=Format([StateDuration]/86400,"hh:mm:ss")

When the hours go above 24, then I see an error, which I know why, but I do
not know what to use for what I want to see.

If the total seconds is 93937, I would like to see 26:05:37

Any help would be appreciated!
 
M

Marshall Barton

MichelleM said:
I have looked through many, many posts and I have not been able to find an
answer to my question, so here it goes....

I have a report that tracks how long a person was in a certain phone state
[StateDuration]. The sum displays in seconds, I want to convert the seconds
to HH:MM:SS. The control source I'm currently using is:

=Format([StateDuration]/86400,"hh:mm:ss")

When the hours go above 24, then I see an error, which I know why, but I do
not know what to use for what I want to see.

If the total seconds is 93937, I would like to see 26:05:37


You need to use an expression for that:

=StateDuration \ 3600 & Format((StateDuration Mod 3600) \
60, "\:00") & Format(StateDuration Mod 60, "\:00")
 
M

MichelleM via AccessMonster.com

Perfect! Thank you so much!!

Marshall said:
I have looked through many, many posts and I have not been able to find an
answer to my question, so here it goes....
[quoted text clipped - 9 lines]
If the total seconds is 93937, I would like to see 26:05:37

You need to use an expression for that:

=StateDuration \ 3600 & Format((StateDuration Mod 3600) \
60, "\:00") & Format(StateDuration 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