+ Reply to Thread
Results 1 to 8 of 8

Convert Date into workable excel date format

  1. #1
    Forum Contributor
    Join Date
    08-13-2014
    Location
    Chicago
    MS-Off Ver
    2013
    Posts
    209

    Convert Date into workable excel date format

    I have a column with date formatted as "Sunday 13th October 2013". What would be the fastest way to convert this to a workable excel date format using formulas?

    Thanks!

    M

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Convert Date into workable excel date format

    if you want it to be, such as dd/mm/yyyy

    =TEXT(A1,"dd/mm/yyyy")
    Quang PT

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Convert Date into workable excel date format

    To convert to an excel date,

    =DATEVALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,LEN(A1)),"th",""),"rd",""),"st",""))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Convert Date into workable excel date format

    Assuming your current data is text and not a formatted date, then with data in A2 try this formula in B2

    =MID(REPLACE(A2,FIND(" ",A2,FIND(" ",A2)+1)-2,2,""),FIND(" ",A2)+1,99)+0

    Format B2 in required date format
    Audere est facere

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Convert Date into workable excel date format

    Quote Originally Posted by sweep View Post
    =DATEVALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,LEN(A1)),"th",""),"rd",""),"st",""))
    I was surprised that this works with August dates, because the "st" in August is also being removed, but apparently

    =DATEVALUE("1 Augu 2014")

    still works!

    .....you do need to also SUBSTITUTE for "nd", though, otherwise you'll get an error with

    Monday 2nd February 2015

  6. #6
    Forum Contributor
    Join Date
    08-13-2014
    Location
    Chicago
    MS-Off Ver
    2013
    Posts
    209

    Re: Convert Date into workable excel date format

    Thanks for the help! Modified it to this and works great:

    =DATEVALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(F2,FIND(" ",F2)+1,LEN(F2)),"nd",""),"th",""),"rd",""),"st",""))

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Convert Date into workable excel date format

    This formula also works for me

    =MID(REPLACE(F2,FIND(" ",F2,11)-2,2,""),FIND(" ",F2)+1,99)+0

  8. #8
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Convert Date into workable excel date format

    Quote Originally Posted by daddylonglegs View Post
    I was surprised that this works with August dates, because the "st" in August is also being removed, but apparently

    =DATEVALUE("1 Augu 2014")

    still works!

    .....you do need to also SUBSTITUTE for "nd", though, otherwise you'll get an error with

    Monday 2nd February 2015
    Thanks for the "nd" correction - I had considered the "August issue" and was too surprised when it worked.

+ 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 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
  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. convert SAP date format to excel date format
    By togyika in forum Excel General
    Replies: 2
    Last Post: 10-26-2011, 05:29 AM
  4. Convert excel date to date format
    By nygwnj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2007, 12:30 PM
  5. [SOLVED] Convert an Excel date to a date of my format in VBA
    By Sunnous in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2005, 12:45 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