ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to keep 0 for military time (https://www.excelbanter.com/excel-discussion-misc-queries/108487-how-keep-0-military-time.html)

Tory

How to keep 0 for military time
 
When I enter 0630 it displays 630. How do I keep the 0?

Gord Dibben

How to keep 0 for military time
 
Precede the 0630 with an apostrophe but the text will not be a time.

OR enter time as 06:30

Excel is very structured when it comes to entering dates and times.

You cannot just enter 060906 and get a valid date.

You cannot enter 0630 and return a valid time

See Chip Pearson's site for working with dates and times.

http://www.cpearson.com/excel/datetime.htm#SerialDates

Also see the code involved for entering times without the colon(s)

http://www.cpearson.com/excel/DateTimeEntry.htm


Gord Dibben MS Excel MVP


On Mon, 4 Sep 2006 20:33:01 -0700, Tory wrote:

When I enter 0630 it displays 630. How do I keep the 0?



Fingerjob

How to keep 0 for military time
 
Or you can make a custom format = 0000.
When you type 0630 or 630 it will show 0630.
But the value in the cell will be 630

Best regards

pp

Gord Dibben skrev:

Precede the 0630 with an apostrophe but the text will not be a time.

OR enter time as 06:30

Excel is very structured when it comes to entering dates and times.

You cannot just enter 060906 and get a valid date.

You cannot enter 0630 and return a valid time

See Chip Pearson's site for working with dates and times.

http://www.cpearson.com/excel/datetime.htm#SerialDates

Also see the code involved for entering times without the colon(s)

http://www.cpearson.com/excel/DateTimeEntry.htm


Gord Dibben MS Excel MVP


On Mon, 4 Sep 2006 20:33:01 -0700, Tory wrote:

When I enter 0630 it displays 630. How do I keep the 0?





All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com