+ Reply to Thread
Results 1 to 6 of 6

Converting Text to Dates

  1. #1
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Converting Text to Dates

    Hi all,

    I'm having a bit of a brain glitch.

    I consider myself a fairly intermediate to advanced Excel user, and I cannot, for the life of me, trouble shoot converting these strings into dates.

    This is an Excel export from an online data set, and I would just like to convert the values in column A to proper dates. I've tried everything from just simply changing the option in the drop down menu to Long/Short date, to using the DATEVALUE function, to using the text to columns transposition.

    I'm not sure if I'm missing a step, but it just doesn't want to seem to convert these values to dates. The reason I'm trying to do this so adamantly is because I need to then sort the list from earliest, to latest date.

    Any help is greatly appreciated!
    Attached Files Attached Files

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

    Re: Converting Text to Dates

    Text to columns works for me, for the Date did you choose MDY?

  3. #3
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Re: Converting Text to Dates

    Oh my god, I was definitely clicking on the wrong option there.

    Thanks so much!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Converting Text to Dates

    You can use this formula (e.g. in B2):

    =IF(ISNUMBER(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(RIGHT(A2,4),LEFT(A2,FIND("/",A2)-1),SUBSTITUTE(MID(A2,FIND("/",A2)+1,2),"/","")))

    Format that cell as a date in the style you prefer, then copy down to the bottom of your data.

    You could then fix the values in column B and delete column A if you no longer need those values.

    Hope this helps.

    Pete

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

    Re: Converting Text to Dates

    Glad to help & thanks for the feedback.

  6. #6
    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,884

    Re: Converting Text to Dates

    An alternative means is to use Power Query

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    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

+ 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] Converting Text to Dates - TextToColumns
    By FASTiger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2013, 02:56 AM
  2. Problem with converting dates to text
    By Seraph84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2013, 01:16 PM
  3. Replies: 0
    Last Post: 01-30-2013, 07:05 PM
  4. converting dates to text
    By boarders paradise in forum Excel General
    Replies: 6
    Last Post: 07-18-2011, 02:19 AM
  5. Converting Text to Dates
    By andrewc in forum Excel General
    Replies: 3
    Last Post: 02-11-2011, 12:16 PM
  6. Converting Text Values to Dates
    By Frank Winston in forum Excel General
    Replies: 12
    Last Post: 06-05-2006, 06:35 AM
  7. Converting Text dates into dates
    By EAB1977 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2006, 12:25 PM
  8. [SOLVED] Converting text to dates
    By Jack in forum Excel General
    Replies: 2
    Last Post: 04-25-2005, 03:06 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