+ Reply to Thread
Results 1 to 12 of 12

How to convert unusual date number to a date format

  1. #1
    Registered User
    Join Date
    05-29-2019
    Location
    Houston, USA
    MS-Off Ver
    Excel 365
    Posts
    3

    How to convert unusual date number to a date format

    I get excel sheets with dates like the following and have to constantly convert them to another date format: 190501 and want to create a formula to automatically convert this to 05/01/2019.

  2. #2
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,412

    Re: How to convert unusual date number to a date format

    Welcome to the forum!

    Try this:

    =DATE(YEAR(2000+LEFT(A1,2)),MONTH(MID(A1,2,2),DAY(RIGHT(A1,2))
    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.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,317

    Re: How to convert unusual date number to a date format

    Or maybe...

    =(MID(A1,3,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,2))+0 >> format as data how you desire

    @Ali, your submission seems to be missing a parenthesis and the mid function should be 3 and not 2
    HTH
    Regards, Jeff

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to convert unusual date number to a date format

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or use text to columns, changing the date format dropdown in the last tab to YMD

  5. #5
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,412

    Re: How to convert unusual date number to a date format

    Thanks, Jeff.

    =DATE(YEAR(2000+LEFT(A1,2)),MONTH(MID(A1,3,2)),DAY(RIGHT(A1,2))

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to convert unusual date number to a date format

    You might want to test that formula, Ali

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to convert unusual date number to a date format

    Another way:

    A
    B
    C
    2
    190501
    01 May 2019
    B2: =--TEXT(A1, "2\000-00-00")
    Last edited by shg; 05-29-2019 at 02:44 PM.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,412

    Re: How to convert unusual date number to a date format

    You seem to be enjoying catching me out today, Jason!

    You've corrected it in post #4, so no need for me to bother.

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to convert unusual date number to a date format

    Quote Originally Posted by AliGW View Post
    You seem to be enjoying catching me out today, Jason!
    Not deliberately, honest guv! You just seem to be having an off day, I'll try to avoid looking at any more of your answers, just in case

    I think the rep in ths thread has to go to shg for the simple and elegant solution that we all missed though.
    Last edited by jason.b75; 05-29-2019 at 01:44 PM.

  10. #10
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,412

    Re: How to convert unusual date number to a date format

    Yup - one or two gaffs, but actually quite a lot that have been spot on today for me!!!

    Kudos to SHG.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: How to convert unusual date number to a date format

    Alternatively, you can just use text to columns & select YMD

  12. #12
    Registered User
    Join Date
    05-29-2019
    Location
    Houston, USA
    MS-Off Ver
    Excel 365
    Posts
    3

    Re: How to convert unusual date number to a date format

    This helped! Thank you so much!!

+ 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] Convert/Format Date to Serial Number not Date number.
    By rakotonirinas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2019, 12:26 PM
  2. Unusual Date Format - need a fix
    By simon4amiee in forum Excel General
    Replies: 61
    Last Post: 01-08-2015, 11:00 AM
  3. Convert Number into date format
    By Chieps in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 07-09-2013, 01:41 AM
  4. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  5. Convert date from date format to number format
    By althea10 in forum Excel General
    Replies: 2
    Last Post: 02-17-2011, 10:54 AM
  6. convert date number to date format
    By nygwnj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2007, 02:15 PM
  7. convert number to date format
    By Lesley in forum Excel General
    Replies: 4
    Last Post: 07-12-2006, 04:25 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