+ Reply to Thread
Results 1 to 4 of 4

convert dd/mm/yyyy to yyymmdd

  1. #1
    Registered User
    Join Date
    05-21-2009
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2003
    Posts
    34

    convert dd/mm/yyyy to yyymmdd

    I have a colum of dates (2156 records) where the date is in dd/mm/yyyy format. Also some have the 0 some don't such as 31/06/2012 is 31/6/2012 or 04/02/2012 is 4/2/2012. So I can't do =left(cell, 4) & mid(4,2) & right(2). Is there a function that will convert (dd/mm/yyy) to (yyyymmdd)?

    Thanks for you help.
    Cardgunner

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: convert dd/mm/yyyy to yyymmdd

    ..So I can't do =left(cell, 4) & mid(4,2) & right(2)
    But you can: =DAY(CELL)----=MONTH(CELL)------YEAR(CELL).

    Also take a look to TEXT to COLUMNS option.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: convert dd/mm/yyyy to yyymmdd

    hi Cardgunner, could you select the range & press CTRL + SHIFT + ~
    you should see all of them become numbers if they are real dates. then undo it. if they are all numbers, you can simply right-click & format cells -> Custom:
    yyyymmdd

    if they are not, select the range again. go to Data -> Text to Column -> Delimited -> Next -> Next -> Date: DMY -> Finish. you can now do the same formatting of cells mentioned.

    upload a file if it dont work

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    05-21-2009
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: convert dd/mm/yyyy to yyymmdd

    The text to column worked. Not all the fields were real dates by using your ctrl+shift+~.

    So it parsed out the dates and put them in the next 3 columns and I can now proceed.

    Thanks for the great help.

    Cardgunner.

+ 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