Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Converting Time to Whole Numbers in Excel

Status
Not open for further replies.

CWEngineer

Civil/Environmental
Jul 3, 2002
269
I am trying to convert for example 10:00 A.M. from an excel cell that has time format to 10.00. Another example is trying to convert 17:30 Military time to 5.5.

Can this be done? I really appreciate your help and suggestions.

thanks
 
Replies continue below

Recommended for you

Not sure what you are trying to do.

If you take the fractional part of the serial number time format and multiply that by 24, you have military time in decimal format.

TTFN
 
To expand on IRstuff's post, if your time value is in cell A1, then the following will convert it to a decimal time:

=24*(RIGHT(A1,LEN(A1)-(FIND(".",VALUE(A1))-1)))

Ken
 
I placed 11:30 in cell A1, then I place the formula in cell B1. The result it gave me was 12:00.

What I am trying to get is 11.5.

I appreciate your help. thanks
 
Change the formatting of cell B1 to "General" or "Number". Looks like Excel sees that formual (when first entered) and automatically changes the formatting of the cell to Time or Custom.

Ken
 
Here's another way, again presuming the time is located in cell A1:

=HOUR(A1)+MINUTE(A1)/60

As KenBolen mentioned in his solution, the format must be set to "Number".

-InspEngr
 
should be simpler than that:

enter 11:30 pm in A1

in B1 put =24*A1

format B1 for "number"

B1 should read 23.5

TTFN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor