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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change to days, hours, minutes

Status
Not open for further replies.

jjb373

MIS
Feb 4, 2005
95
0
0
US
This displays the hours and mintues like this:
51hr 05min

=[txtAvgHXS]\3600 & "hr " & Format(([txtAvgHXS]-([txtAvgHXS]\3600)*3600)\60,"00" & "min")

I want to display:
2d 3hr 05min

Any suggestions?

Thanks in advance
 
assuming txtAvgHXS is in seconds,
txtAvgHXS\86400
will give you days.

=[txtAvgHXS]\86400 & "d " & [txtAvgHXS]\3600 & "hr " & Format(([txtAvgHXS]-([txtAvgHXS]\3600)*3600)\60,"00" & "min")



-Pete
 
There are numerous threads addressing date/time calculations and display formats in these fora. Use of the search funcfion with some key words of choice should return a sample of the possabilities as well as providing some insight into how to retrieve information more efficiently.




MichaelRed


 
So, can you redo to assume txtAvgHXS is in minutes?
 
Sure.

=[txtAvgHXS]\1440 & "d " & [txtAvgHXS]\60 & "hr " & Format(([txtAvgHXS]-([txtAvgHXS]\1440)),"00") & "min"

-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top