time conversion from 1945 general text to 7:45

V

velocityinc

how do I manage to convert this time from one format to another
I have several cells in column A with time in the following manner:
examples

645 which should be 06:45
1245 which whould be 12:45

please assist - thanks
 
P

Peo Sjoblom

One way

=--(TEXT(A1,"00\:00"))

format the cell with the formula as [hh]:mm or hh:mm or else you will get a
decimal values

where A1 holds the value in question
 
G

Guest

I have used this mothod with great success, but I modified it by allowing the
user to add a + sign at the end of the input to add 12 hours so that the user
does not need to know military time.

715 -> 7:15 AM
715+ -> 7:15 PM

If you want the code just post back...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top