time calculations

I

iccsi

I have a field which has data in seconds.

I would like to show user hh:mm:ss for display format.

Are there any functions to conver seconds to hh:mm:ss to end users or
I have code to calculate by myself?

Your information is great appreciated,
 
M

Marshall Barton

iccsi said:
I have a field which has data in seconds.

I would like to show user hh:mm:ss for display format.

Are there any functions to conver seconds to hh:mm:ss to end users or
I have code to calculate by myself?


Calculate it yourself:

If you can guarantee that your seconds value will always be
less than 24 hours, then you can get away with using:
Format(secs / (24*60*60#), "h:nn:ss")

Otherwise this will do it:
=secs \ 3600 & Format((secs \ 60) Mod 60, "\:00") &
Format(secs Mod 60, "\:00")
 
I

iccsi

Calculate it yourself:

If you can guarantee that your seconds value will always be
less than 24 hours, then you can get away with using:
        Format(secs / (24*60*60#), "h:nn:ss")

Otherwise this will do it:
        =secs \ 3600 & Format((secs \ 60) Mod 60, "\:00") &
Format(secs Mod 60, "\:00")

Thanks millions,
 

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