+ Reply to Thread
Results 1 to 7 of 7

EXCEL - convert a text string into a date (not just format)

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    ST Louis
    MS-Off Ver
    Excel 2007
    Posts
    2

    EXCEL - convert a text string into a date (not just format)

    Not sure where this post should be but it is a format / general Excel question. I was given an excel sheet with one cell labeled "YYMMDD" for the date. The records in that field are, for example, "170603". I am trying to get that text string into a date format so it shows up as 06/03/17 (it is NOT a formatting function.). Manual is out of the question since there are 37000+ records can anyone tell me what the best way to convert this is?

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: EXCEL - convert a text string into a date (not just format)

    with your example you can try =DATE(20&LEFT(A1,2),MID(A1,3,2),RIGHT(A1,2))

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: EXCEL - convert a text string into a date (not just format)

    you will need VBA to change to a date in the cell
    in a new column you could use
    if the dates are in column A startign row 2
    =DATEVALUE(RIGHT(A2,2)&"/"&MID(A2,3,2)&"/"&LEFT(A2,2))
    and copy down
    that will change to a date

    then you could click on the column and copy
    paste special back over the original column
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: EXCEL - convert a text string into a date (not just format)

    also you can use Text2Columns with YMD and after all it will be adapted to your local settings

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    ST Louis
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: EXCEL - convert a text string into a date (not just format)

    Quote Originally Posted by sandy666 View Post
    with your example you can try =DATE(20&LEFT(A1,2),MID(A1,3,2),RIGHT(A1,2))
    Awesome...this worked perfectly and is exactly what i needed. Thank you sandy (no caps)

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: EXCEL - convert a text string into a date (not just format)

    hehehe , thanks for no caps you are the first person who read it correct

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it - ignore it.
    Thank you.

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: EXCEL - convert a text string into a date (not just format)

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

    v A B
    1 170603 6/3/2017
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] How to convert a set of string into date MM-YYYY format
    By Acan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-30-2014, 06:29 AM
  2. [SOLVED] How to convert exported text date to desired date format with excel vba.
    By sktneer in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 10-03-2013, 01:08 AM
  3. [SOLVED] Convert a general format string to calendar date in Excel 2010 vba?
    By Kuriakos in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-18-2012, 11:44 AM
  4. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM
  5. convert date format to text in all excel files in a folder
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-31-2011, 01:12 PM
  6. [SOLVED] Excel date format convert to string format
    By man in forum Excel General
    Replies: 1
    Last Post: 08-17-2006, 05:05 AM
  7. [SOLVED] Date format not correct when you convert a CSV text file in Excel
    By Scarab in forum Excel General
    Replies: 2
    Last Post: 11-16-2005, 08:25 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