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

Converting military times to numbers 1

Status
Not open for further replies.

Wire216

Technical User
Feb 15, 2006
18
US
I have a column that contains times in military format. I want to convert the times to numbers, with no formatting.

For example:

Right now the columns show the following:

0:01
0:23
2:14
13:32
19:54

Their actual values are:

12:01:00 AM
12:23:00 AM
2:14:00 AM
1:32:00 PM
7:54:00 PM

I want it to instead have the following values:

1
23
214
1332
1954

They should be formatted as numbers, with no indication that they represent times.

Is this possible?

I have a worksheet that contains military times in number format that I need to compare against.

Thanks.


 
This should do it ....

[blue][tt] =VALUE(TEXT(A1,"hhmm"))[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top