+ Reply to Thread
Results 1 to 10 of 10

Excel Date Appears as Date, Says It's Formatted as Number

  1. #1
    Registered User
    Join Date
    05-03-2022
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    21

    Excel Date Appears as Date, Says It's Formatted as Number

    Today, Excel 2016 (on Windows 10) greets me with this:

    Clipboard01.png

    As that image indicates, Excel is displaying a date-time combination in D3, and yet Excel says D3 is formatted as a number. I think it should say that it is displaying a date or time format. That is issue no. 1.

    When I use Format Painter to copy the formatting of D3 to D2, I get 44767, as displayed. That, I agree, is formatted as a number.

    The formula in D2 is this: =B2-C38/24/60
    where C38 presently contains the number 71.

    That formula, and Format Painter, would lead me to expect that D2 would say "07/24/2022 12:32 PM." That is, I think D2 should state a time that is 71 minutes less than B2, and I think the time should be displayed in the same format as D3. That is not what appears in D2. That is issue no. 2.

    So, two issues. What am I getting wrong here?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    Dates and times can be awkward.

    However, a picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    05-03-2022
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    21

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    Thanks for that humane response, Glenn. Sorry: I got out of bed, had fog in my eyes, fog in my head, and an uncooperative Excel. Reading a yellow banner was apparently beyond my capacity at the moment. Let's try this again.

    Hopefully I have the sample spreadsheet attached this time.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    The dates are in fact text (in the sample workbook):

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    B
    C
    D
    1
    Ending Time
    Minutes Elapsed
    (Est'd) Start Time
    2
    07/24/2022 01:43 PM
    #VALUE!
    3
    07/24/2022 02:57 PM
    #VALUE!
    07/24/2022 01:43 PM
    4
    07/24/2022 04:04 PM
    #VALUE!
    07/24/2022 02:57 PM
    5
    07/24/2022 05:15 PM
    #VALUE!
    07/24/2022 04:04 PM
    6
    07/24/2022 06:25 PM
    #VALUE!
    07/24/2022 05:15 PM
    7
    07/24/2022 07:33 PM
    #VALUE!
    07/24/2022 06:25 PM
    8
    07/24/2022 08:48 PM
    #VALUE!
    07/24/2022 07:33 PM
    9
    07/24/2022 11:01 PM
    #VALUE!
    07/24/2022 08:48 PM
    10
    07/25/2022 12:25 AM
    #VALUE!
    07/24/2022 11:01 PM
    11
    07/25/2022 01:37 AM
    #VALUE!
    07/25/2022 12:25 AM
    12
    07/25/2022 02:40 AM
    #VALUE!
    07/25/2022 01:37 AM
    13
    07/25/2022 03:50 AM
    #VALUE!
    07/25/2022 02:40 AM
    14
    07/25/2022 05:00 AM
    #VALUE!
    07/25/2022 03:50 AM
    Sheet: Sheet1
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    The dates are being seen as Text regardless of how it is being formatted. This usually happens when you copy/paste from somewhere else into Excel.

    You can quickly tell if a cell is being seen as Text by removing any alignment and seeing if it is left aligned in the cell.
    Also, =ISTEXT(B3) will return TRUE when B3 is being seen as Text.

    You want to get Excel to recognize that they are in fact dates.
    You could change the column formatting and then double click on each cell to get them to format as a date (or number which you can then format as a date), but the quicker way to do this is by using Text to Columns.

    Highlight column B > Data > Text to Columns > Delimited > Finish
    You can now format columns B and D as a date.

  6. #6
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    To carry on from what 63falcondude is stating, you could just do =Value() of the cell next to the column where you seem to be pasting. This way it always transforms it into a value... your data would have no issues doing this based on what I just opened from your post...

    what you have as D3 = B3 change D3 to =Value(B3) and send it down. Everything will then display as a number since that is the formatting of the field.
    -If you think you are done, Start over - ELeGault

  7. #7
    Registered User
    Join Date
    06-22-2022
    Location
    India
    MS-Off Ver
    Microsoft office Home and Student 2019
    Posts
    61

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    Hi,

    Since I am seeing the Date as Text Format, I have written a formula to achieve your requirement. Try using this and check if this works for the Issue No.2.

    =CONCATENATE(LEFT(B2,10)," ",TEXT(TIME(HOUR(TIMEVALUE(RIGHT(B2,8))-C38/1440),MINUTE(TIMEVALUE(RIGHT(B2,8))-C38/1440),SECOND(TIMEVALUE(RIGHT(B2,8))-C38/1440)),"hh:mm AM/PM"))

  8. #8
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    I still am missing the issue...Other than you pasted text into a document and until there is interaction is being "Displayed" as text...

    any formula against it will be treated appropriately unless there are characters that prevent Excel from correctly reading it... that is not the case with your data....

    The VISUAL... Display of the cell that you entered your formula into simply needs to be updated.

    Right click and go to FORMAT CELLS or hit CTRL+1, go down to CUSTOM and use mm/dd/yyyy hh:mm AM/PM;@ as the format and you will get the displayed value in the format you want without toying with the cells actual value or contents

    Edit, if you are going to use that formula all the way down the list, fix the reference to the avg of full items... If it is not an absolute reference against the row it will shift down as you carry the formula down

    =B2-C$38/24/60

  9. #9
    Registered User
    Join Date
    06-22-2022
    Location
    India
    MS-Off Ver
    Microsoft office Home and Student 2019
    Posts
    61

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    Hi,
    Attached File for your reference. I have followed following steps to achieve the requirement. First to split the Date/time Stamp into Date and time separately and then changing it to the required format works in this case.

    Step 1: Select the cells from B2 to B36, Go to Data>Text to Columns>Fixed Width
    Step 2: Click Next and Remove the break line between Time and AM/PM.
    Step 3: Click Next & Select the Date option and change the destination to G2 and click Finish
    Step 4: Now, G2 and H2 will have the date and time respectively. Add Formula in I2 as =G2+H2.
    Step 5:Go to the format cells>Custom Change the format of G2 as mm/dd/yyyy, H2 as hh:mm AM/PM and I2 as mm/dd/yyyy hh:mm AM/PM.

    I have copied the Formula Column C and D formula to Column J and K. Try this option and see whether this works for you.
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Excel Date Appears as Date, Says It's Formatted as Number

    I still dont see the need for a big operation.

    Format the cell that has the formula to estimate the FIRST start time to be the format VISUALLY that you want

    The rest transform into the VALUE of the previous END time and again set to the same FORMAT that you want
    Attached Files Attached Files

+ 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. Replies: 3
    Last Post: 10-04-2021, 05:35 PM
  2. Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  3. [SOLVED] how to get the number of days between two date formatted fields in vba for excel?
    By Daniel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  4. [SOLVED] how to get the number of days between two date formatted fields in vba for excel?
    By Daniel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. [SOLVED] how to get the number of days between two date formatted fields in vba for excel?
    By Daniel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  6. [SOLVED] how to get the number of days between two date formatted fields in vba for excel?
    By Daniel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. [SOLVED] how to get the number of days between two date formatted fields in vba for excel?
    By Daniel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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