+ Reply to Thread
Results 1 to 3 of 3

Retrieve date value from text string and format as a date

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Retrieve date value from text string and format as a date

    Can someone help?

    I need to format a date in column 'B' as mm/dd/yyyy. Currently April 9 2015 is displayed as 040915 but I need it to be displayed as 4/9/2015. The formula in column 'B' is

    =IFERROR(IF(DATE(2000+RIGHT(RIGHT(L2,6),2),LEFT(RIGHT(L2,6),2),MID(RIGHT(L2,6),3,2)),RIGHT(L2,6),""),"")

    this formula pulls last six digits from a text & number string in column 'L'. the sample data and a screenshot are attached below.

    I tried to embed DATEVALUE function in the formula in this column but Excel doesn't recognize this as a date and returns #VALUE error. I also tried to format the values as a dates but nothing works.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Retrieve date value from text string and format as a date

    Give this formula a try

    =IFERROR(IF(DATE(2000+RIGHT(RIGHT(L2,6),2),LEFT(RIGHT(L2,6),2),MID(RIGHT(L2,6),3,2)),TEXT(LEFT(RIGHT(L2,6),2) &"/"& MID(RIGHT(L2,6),3,2) &"/"&RIGHT(RIGHT(L2,6),2)+0,"mm/dd/yyyy"),""),"")

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Retrieve date value from text string and format as a date

    the formula works as a charm! Thanks so much! I added reputation to your profile.

+ 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. Changing date format in a text string
    By rsmith10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2014, 09:46 AM
  2. 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
  3. Replies: 1
    Last Post: 06-06-2011, 10:08 AM
  4. Converting ddmmyy date format to text string
    By Fos605 in forum Excel General
    Replies: 1
    Last Post: 06-06-2008, 09:49 AM
  5. Converting Text String to Date Format
    By mccrimmon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2007, 11:09 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