SOLVED

Time format

%3CLINGO-SUB%20id%3D%22lingo-sub-2423652%22%20slang%3D%22en-US%22%3ETime%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2423652%22%20slang%3D%22en-US%22%3E%3CP%3Ewhy%20does%20the%20cell%20turn%20my%20time%20to%2012%3A00%20AM%20regardless%20of%20the%20number%20or%20formula%20in%20the%20cell%3F%26nbsp%3B%20When%20I%20expand%20the%20cell%2C%20I%20see%20the%20date%20is%20some%20day%20in%20January%201900.%26nbsp%3B%20My%20computer%20(Dell%20Inspiron%2C%20Windows%2010)%20is%20set%20to%20the%20correct%20date.%26nbsp%3B%20I%20just%20want%20to%20turn%20the%20result%20of%20the%20formula%2C%2019%2C%20to%20read%207%20PM.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2423652%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2423695%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2423695%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1073173%22%20target%3D%22_blank%22%3E%40vb_pilgrim%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMS%20and%20Excel%20are%20starting%20when%20counting%20in%20dates%20with%20the%201.1.1900.%20For%20example%20today%20is%20day%2044354.%20You%20can%20change%20this%20when%20you%20just%20change%20the%20formatting%20from%20date%20to%20for%20example%20default%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Schnittlauch_1-1623100067414.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F286997i2EB5260ED0CD1D49%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Schnittlauch_1-1623100067414.png%22%20alt%3D%22Schnittlauch_1-1623100067414.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2423721%22%20slang%3D%22en-US%22%3ERe%3A%20Time%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2423721%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1073173%22%20target%3D%22_blank%22%3E%40vb_pilgrim%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20convert%2019%20to%20a%20valid%20time%2C%20use%20a%20formula%20to%20divide%20it%20by%20the%20number%20of%20hours%20in%20a%20day%2C%2024.%3C%2FP%3E%0A%3CP%3ESo%20with%2019%20in%20for%20example%20A2%2C%20enter%20the%20following%20formula%20in%20B2%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DA2%2F24%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eand%20format%20B2%20as%20a%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E(Some%20background%3A%3C%2FP%3E%0A%3CP%3EExcel%20stores%20dates%20and%20times%20as%20numbers%2C%20with%201%20day%20as%20unit.%3C%2FP%3E%0A%3CP%3EJanuary%201%2C%201900%20is%20stored%20as%201%3B%20January%202%2C%201900%20is%20stored%20as%202%2C%20etc.%2C%20and%20June%207%2C%202021%20is%2044354.%3C%2FP%3E%0A%3CP%3ETimes%20are%20fractions%20of%20a%20day%3A%206%20hours%20is%200.25%2C%2018%20hours%20is%200.75%20etc.%3C%2FP%3E%0A%3CP%3EFor%20a%20date%20and%20time%2C%20Excel%20adds%20the%20whole%20number%20and%20the%20fraction%3A%206%20PM%20on%20June%207%2C%202021%20is%2044354.75.%3C%2FP%3E%0A%3CP%3EBut%20if%20you%20only%20specify%20the%20time%2C%20without%20a%20date%2C%20the%20integer%20part%20of%20the%20number%20is%200%2C%20corresponding%20to%20the%20non-existent%20date%20January%200%2C%201900.)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

why does the cell turn my time to 12:00 AM regardless of the number or formula in the cell?  When I expand the cell, I see the date is some day in January 1900.  My computer (Dell Inspiron, Windows 10) is set to the correct date.  I just want to turn the result of the formula, 19, to read 7 PM. 

 

Thank you in advance

3 Replies

Hi @vb_pilgrim,

 

MS and Excel are starting when counting in dates with the 1.1.1900. For example today is day 44354. You can change this when you just change the formatting from date to for example default

 

Schnittlauch_1-1623100067414.png

 

 

best response confirmed by vb_pilgrim (New Contributor)
Solution

@vb_pilgrim 

 

To convert 19 to a valid time, use a formula to divide it by the number of hours in a day, 24.

So with 19 in for example A2, enter the following formula in B2:

 

=A2/24

 

and format B2 as a time.

 

(Some background:

Excel stores dates and times as numbers, with 1 day as unit.

January 1, 1900 is stored as 1; January 2, 1900 is stored as 2, etc., and June 7, 2021 is 44354.

Times are fractions of a day: 6 hours is 0.25, 18 hours is 0.75 etc.

For a date and time, Excel adds the whole number and the fraction: 6 PM on June 7, 2021 is 44354.75.

But if you only specify the time, without a date, the integer part of the number is 0, corresponding to the non-existent date January 0, 1900.)

@Hans Vogelaar 

Thank you.  This helped a lot.

 

Vicki