Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using mod 60 - add a zero under 10 minutes?

Status
Not open for further replies.

Hfnet

IS-IT--Management
Dec 31, 2003
369
GB
I am using the following query to get hours and minutes elapsed:

TimeOnBench \ 60 & ":" & TimeOnBench Mod 60

If a job has been going for 62 minutes it produces the result:

1:2

How can I add to the query to make anything under 10 hours or 10 minutes appear as 0x:0x, i/e 62 minutes produces 01:02?

Thanks
 
Try:

Format(TimeOnBench \ 60,"00") & ":" & Format(TimeOnBench Mod 60,"00")


Hope this helps
 
Another way:
Format(TimeOnBench / 1440, 'hh:nn')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks both of you, I went with PHV purely for length of code.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top