+ Reply to Thread
Results 1 to 5 of 5

Formula to take the time out of a date cell and reformat said date

  1. #1
    Registered User
    Join Date
    07-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Formula to take the time out of a date cell and reformat said date

    A colleague of mine asked me how to do this and it sounded pretty simple. However, it proved to be a little tricky - though eventually he found a lengthy work around. Just wondering whether there is an easy way to do this.

    He imported a set of data into an Excel spreadsheet where the date appeared as such:

    Jan 3 2013 12:00

    So: month, a double space, the day, space, time.

    He wanted the date in the cell to read like this (in the UK format rather than the US):

    03/01/2013
    (day/month/year)

    Eventually, using a combination of concatenate and trim to get rid of the spaces, he was able to do this. But just wondering whether there was a much simpler way that we might have overlooked? I believe this is something he will need to do again in the future.

    Any help would be greatly appreciated!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: Formula to take the time out of a date cell and reformat said date

    A possibility:

    select the column with dates - Data - Text to columns
    Select Fixed width
    Remove all column breaks except the last one ( perhaps move it a bit)
    Next
    Select the first column
    Select Date and MDY from the dropdown
    Select the second column and select " Do not import column"
    Finish

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Formula to take the time out of a date cell and reformat said date

    In A1 Cell
    Jan 3 2013 12:00

    The below formula will work fine if your system date setting is MM-DD-YYYY

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


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    07-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Formula to take the time out of a date cell and reformat said date

    Thanks for the swift response, both of you!

    Ill pass on both possibilities to him and hopefully they will prove easier to use.

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Formula to take the time out of a date cell and reformat said date

    Hi C_P

    Assuming the data is in A1
    =--SUBSTITUTE(TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",50)),50,100))," ",LEFT(A1,FIND(" ",A1)-1))
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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