Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

adding a colon to military time

2,469 views
Skip to first unread message

Suzanne

unread,
Dec 6, 2007, 1:23:03 PM12/6/07
to
I need to add a colon to military time. I need to change it from 1700 to
17:00. I want it to stay in military time. I don't want am or pm to show.
I can't figure out how to do this on the worksheet. Anyone know how to do
this?

CLR

unread,
Dec 6, 2007, 1:32:02 PM12/6/07
to

Try Custom format 00":"00

Vaya con Dios,
Chuck, CABGx3

Teethless mama

unread,
Dec 6, 2007, 1:35:01 PM12/6/07
to
=TEXT(A1,"00\:00")+0

format cell: hh:mm

Ron Rosenfeld

unread,
Dec 6, 2007, 1:45:10 PM12/6/07
to
On Thu, 6 Dec 2007 10:23:03 -0800, Suzanne <Suz...@discussions.microsoft.com>
wrote:

1. Is the 1700 an Excel time formatted as hhmm, or is it merely the number
1700?

2. Do you want the result to be recognized by Excel as a Time, or just as a
number?

3. To change the format of 1700 so it "looks like" 17:00 (but the stored value
is still 1700) then select the cell(s) and
Format/Number/Custom Type: 00\:00

4. To change it to a value recognized as a Time by Excel, you will need a
formula (see below). Then Format/Number/Custom Type: hh:mm

Formula with 1700 in A1: =INT(A1/100)/24+MOD(A1,100)/1440


--ron

Niek Otten

unread,
Dec 6, 2007, 1:52:13 PM12/6/07
to
You had a few replies giving you the right "image" of the time. If you require to calculate with the time, you need to make it
"real" Excel time: a fraction (of a day).

Is your time always 4 positions? ( i.e. no 745 for quarter to eight, but 0845)
If so, with the time in A1:

=TIME(INT(A1/100),MOD(A1,100),0)

Choose the appropriate format from the Format menu, or choose Format Custom, hh:mm

Post again in this thread if this doesn't answer your question

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Suzanne" <Suz...@discussions.microsoft.com> wrote in message news:C6583809-16BB-42B3...@microsoft.com...

Suzanne

unread,
Dec 6, 2007, 5:43:02 PM12/6/07
to
This worked!!!! THANK YOU!!!!!

Gord Dibben

unread,
Dec 6, 2007, 6:49:13 PM12/6/07
to
Just as long as you are aware that this is not a real time.


Gord Dibben MS Excel MVP

On Thu, 6 Dec 2007 14:43:02 -0800, Suzanne <Suz...@discussions.microsoft.com>
wrote:

seo.g...@gmail.com

unread,
Feb 7, 2013, 5:51:58 AM2/7/13
to
0 new messages