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

Converting time into numbers 2

Status
Not open for further replies.

Stewman

MIS
Jan 23, 2002
79
US
Hello all,

I have a column of data calculated by taking the difference of two times. The valued returned is in a time format. I want that value to be a number.

Example
Time Called Time Arrived
14:30 14:45

The difference is 0:15 (This is what appears) I want it to say 15. When I go into format cell and change it to number it gives me a completely different value.

Any help greatly appreciated

Thanks, Chris
 
Chris,

That's because Date and Time are just numbers, like right now, 9/14/2004 17:29 CST is REALLY 38244.72908, which means 38,244 days since 1/1/1900 AND .72908 of a DAY.

Bottom line, Both Date and Time are in units of DAYS.

So your DIFFERENCE is in what units, MINUTES? Since the NUMBER that you see "When I go into format cell and change it to number..." is in units of DAYS, you have to CONVERT DAYS to MINUTES.

If Time Called is in A2 and Time Arrived is in B2 then
[tt]
Minutes = Days * 24 Hrs/Day * 60 Minutes/Hr
=(B2-A2)*24*60
[/tt]




Skip,

[glasses] [red]Be advised:[/red] When transmitting sheet music...
If it ain't baroque, don't fax it! [tongue]
 
Skip,

Thanks for your help. You were 100% right.

Thanks again,

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top