+ Reply to Thread
Results 1 to 15 of 15

date and time is not formatted in excel

  1. #1
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    date and time is not formatted in excel

    I have a report and its date and time is not formatted and when i click filter it is not showing month day and time list from old date to new date

    28-09-2021 11:56 AM
    16-09-2021 03:25 PM
    15-09-2021 01:36 PM
    12-09-2021 10:42 AM
    08-09-2021 04:55 PM


    Can you please share any formula to make this date and time formatted in a new column ?
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,910

    Re: date and time is not formatted in excel

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: date and time is not formatted in excel

    copy an empty cell, then highlight the entire column and go to paste special, then select add then ok and it should change them to numeric and you can format as you want.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: date and time is not formatted in excel

    in B2: =--A2 will do. Make sure to set the cell format correctly. (dd-mm-yyyy hh:mm)
    Messages have been translated from Dutch to English by means of google translate.

  5. #5
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    Re: date and time is not formatted in excel

    @Vraag en antwoord sorry it did not worked

    Attachment 750067
    Last edited by esaji; 10-02-2021 at 05:16 PM.

  6. #6
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    Re: date and time is not formatted in excel

    Quote Originally Posted by alansidman View Post
    Please Login or Register  to view this content.
    Although it worked but the months are not correct it shall be september

    Attachment 750070

  7. #7
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    Re: date and time is not formatted in excel

    Quote Originally Posted by Sam Capricci View Post
    copy an empty cell, then highlight the entire column and go to paste special, then select add then ok and it should change them to numeric and you can format as you want.
    Can you create a animated gif to show me what you wanted to tell me ?

  8. #8
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: date and time is not formatted in excel

    Your attachments cannot be opened. Quoting entire posts is unnecessary. Say what doesn't work instead of saying it doesn't work.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    Re: date and time is not formatted in excel

    Thanks vraag

    can you explain how this =--A2 formula is fixing the date issue i just wanted understand the logic and i can see that new column is not formatted like early you suggested ?dd-mm-yyyy hh:mm

  10. #10
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    Re: date and time is not formatted in excel

    Also I try to use the --A2 formula from the sheet you shared when i click the formula without changing anything it reproduce the same error

    #VALUE!
    on all column try to select the column B2 on formula bar and you will see this error

    regards

  11. #11
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: date and time is not formatted in excel

    #9 -- converts a number stored as text to a number.
    #10 No idea. It just works here.

  12. #12
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: date and time is not formatted in excel

    First, be aware that your column-A "dates" are really just text that looks like a date.

    None of the suggestions made so far work for me either. I think we're battling region code differences regarding what format of text Excel will automatically convert to a date.
    With the --A1 approach 28-09-2021 11:56 AM gives me a #VALUE error because in the USA region Excel expects the 28 to be the month and the 09 to be the day. Similarly (and perhaps worse because there is no error) 12-09-2021 is interpreted as 9-Dec rather than 12-Sep.

    There may be a more elegant way, but the following, I think, is region-proof:
    In b3 copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Don't forget to format col-B as a Date & Time type.

    Note, for simplicity, this formula assumes leading zeros are always present (as your example does). That is: not
    15-9-2021 1:36 PM, but always:
    15-09-2021 01:36 PM

    Hope this helps
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  13. #13
    Registered User
    Join Date
    09-20-2010
    Location
    islamabad
    MS-Off Ver
    Excel 2019
    Posts
    83

    Re: date and time is not formatted in excel

    GeoffW283

    I really enjoyed your root cause analysis yes you are absolutelyright about region issue as I am in Saudi from last year although might be my excel date and time is set with (GMT+3) settings

    your formula worked for me i tested and its correctly showing the date and time

    many thanks

  14. #14
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,910

    Re: date and time is not formatted in excel

    Cannot see attachment. I believe the issue is one of US vs European Date Convention. Change the format to US convention and it should convert exactly as you wish.

  15. #15
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: date and time is not formatted in excel

    esaji - glad it works for you - thanks for the feedback

+ 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] Subtracting [Date/Time] from another [date/time] formatted differently
    By jonvon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2017, 04:15 PM
  2. Best approach to presenting date/time formatted data
    By ritmo2k in forum Excel General
    Replies: 5
    Last Post: 09-30-2016, 11:23 AM
  3. Excel convert Text time formatted 10h 58m to time so I can sum together
    By slinka in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-04-2016, 10:17 AM
  4. Replies: 4
    Last Post: 09-19-2014, 11:26 AM
  5. Replies: 11
    Last Post: 08-10-2009, 03:38 PM
  6. Adding time to date-time formatted cell
    By tawtrey(remove this )@pacificfoods.com in forum Excel General
    Replies: 4
    Last Post: 08-12-2005, 06:05 PM
  7. Subtracting Cells formatted with Date AND Time to get hours?
    By mcr1 - ExcelForums.com in forum Excel General
    Replies: 1
    Last Post: 07-05-2005, 05:05 AM

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