+ Reply to Thread
Results 1 to 6 of 6

Custom time format not working - the digits entered are cganging to zeros

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    12

    Custom time format not working - the digits entered are cganging to zeros

    Hi All,

    While since I've been here. Sorry, but I am probably being very stupid as below.

    I am trying to format cells so that when I enter the digits for a time, it displays in hh:mm format without having to enter the colon. I define the cell as Custom and then select the hh:mm format from the list. I then enter the time as, eg, 1400 and want that to display as 14:00, but it changes the entered digits to all zeros although the format selected displays correctly. Can't suss it. Bats in the belfry.

    HELP please.

    Many thanks.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Custom time format not working - the digits entered are cganging to zeros

    Try a custom format of - 00":"00

    Note that the number will be 1400 that is contained in the cell, and not 14:00 (hh:mm) if you are going to use it for calculations.

  3. #3
    Registered User
    Join Date
    06-04-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Custom time format not working - the digits entered are cganging to zeros

    Thank you, Kersplash. Works a treat. Still don't get why what I had tried didn't work, but there are always more questions than answers.

    Again, many thanks.

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Custom time format not working - the digits entered are cganging to zeros

    Start here to find out about how Excel stores Dates and Times;

    https://www.exceltactics.com/definit...s-times-excel/

    Your entry of 1400 was trying to display day number 1400 from Jan 1 1900 with a time of 00:00, and your format of hh:mm was making it display just the time component of the date and time, therefore 00:00

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Custom time format not working - the digits entered are cganging to zeros

    The time 2PM is not represented in Excel as the number 1400. 2PM (of January 0 1900) is stored in Excel as the number 0.5833333.... If you were to enter 0.583333333 into your cell formatted as hh:mm, it would display correctly as 14:00. When you enter the number 1400 into a cell formatted as hh:mm, the value 1400.0000 corresponds to midnight on the morning of Oct 31, 1903. Entering 1400 into a cell formatted as hh:mm (24 hour clock) would correctly display as 00:00 (meaning midnight).

    I recommend reviewing something like this (http://www.cpearson.com/Excel/datetime.htm ) until you understand how Excel stores dates and times.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    06-04-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Custom time format not working - the digits entered are cganging to zeros

    Thank you to both Kersplash and MrShorty for your prompt and clear replies. I will take your advice and follow the links you have kindly supplied.

    What it is to have friends..........

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Custom Format - Show Zeros
    By Cardan in forum Excel General
    Replies: 1
    Last Post: 10-06-2017, 02:21 PM
  2. Custom format with two digits
    By zico8 in forum Excel General
    Replies: 2
    Last Post: 09-02-2016, 03:47 AM
  3. Separating digits from a custom number format
    By jjbluz in forum Excel General
    Replies: 1
    Last Post: 03-08-2016, 07:25 PM
  4. Format cells to add 3 zeros before my entered number
    By BADebbie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-30-2015, 11:44 AM
  5. [SOLVED] Find digits with custom format and make them negative
    By mangesh.mehendale in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-24-2015, 02:46 AM
  6. Replies: 16
    Last Post: 06-02-2013, 01:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1