+ Reply to Thread
Results 1 to 5 of 5

string of numbers to a date

  1. #1
    Registered User
    Join Date
    12-19-2013
    Location
    Mississippi
    MS-Off Ver
    Excel 2007
    Posts
    2

    string of numbers to a date

    I have a string of numbers as you can see on the provided attachment, that in the columns labeled date of rank, and oer ncoer date, show as yyyymmdd. I need these numbers to show as mm/dd/yyyy, and cannot for the life of me get the formula right to do that. I need to create a blank column, and create the formula to convert the numbers to the desired date format, and then copy and paste special values only to the newly created column. please help.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: string of numbers to a date

    E2:

    =DATE(LEFT(C2,4),MID(C2,5,2),RIGHT(LEFT(C2,8),2))

    Copy down and over as needed.

    Paste those values into C2

    The tricky part for me is that there are proceeding blank values after the string, and they aren't spaces.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: string of numbers to a date

    Try

    =TEXT(LEFT(C2,8),"0000-00-00")+0

    Then format the cell with the formula in a date format of your choice.

  4. #4
    Registered User
    Join Date
    12-19-2013
    Location
    Mississippi
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: string of numbers to a date

    Thanks daffodil, that is exactly what I needed.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: string of numbers to a date

    select column c
    then data /text to columns
    click next twice
    at the bottom you will see two columns labelled general
    click in the first one
    above you have some options
    select date
    select ymd
    click the second column
    choose do not import column (skip)
    click finish
    repeat for column d
    format both columns as date mm/dd/yyyy
    Last edited by martindwilson; 12-19-2013 at 11:43 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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] Extracting date from string of numbers
    By ormerods in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-21-2013, 10:50 AM
  2. [SOLVED] Count numbers between two values in a coma delimited string of numbers
    By van23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 11:42 PM
  3. [SOLVED] Remove numbers from alphanumeric string. No standard format to the string.
    By ricunger in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2012, 01:43 PM
  4. Replies: 2
    Last Post: 08-23-2012, 04:58 PM
  5. Convert numbers to date in text string
    By singerbatfink in forum Excel General
    Replies: 2
    Last Post: 09-21-2010, 05:58 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