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

Converting a time duration in [h]:mm into a number? 1

Status
Not open for further replies.

beanxx

Technical User
Jul 9, 2002
61
0
0
GB
Hi, basically I have a a table of date representing durations and I can't figure out how to convert this into a decimal number. For example 260:30 would output 260.5?

Any ideas?

Thanks Justin
 
Depends on what type of durations you have. If they are all in hours format eg

260:30 as per your example then just multiply by 24 and change the format to general / number

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Multiply by 24 would be an answer but when I look closer I see that the orginal data is not represented as time data but as a number! So 260 hours 30 minutes is represented 260.30
What I would like to see is something that calculates so 260.30 = 260.5, 12.45 = 12.75, etc.

Thanks Justin
 
=TRUNC(A1)+(A1-TRUNC(A1))/60*100

There might be something simpler but this works.
 
Thanks Lupins46 this has sorted the problem. Star duly awarded. Thanks Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top