+ Reply to Thread
Results 1 to 8 of 8

Date formatting trouble

Hybrid View

  1. #1
    Registered User
    Join Date
    02-07-2019
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    4

    Date formatting trouble

    Hello!

    I am sure this question has been asked plenty of times before but I am just learning excel and only know some very basic stuff.

    I have a worksheet with data imported from somewhere else and there is a column of dates which are like: 1222018 and appear to be formatted to General. I need them to be formatted as actual dates. So I need 1222018 to show up like 1/22/2018.

    Simply changing the format to date gives me the date of whatever the serial number and shows up like 10/7/5245. After doing some research online i have tried using text to columns but it doesnt appear to do anything. I have tried some formulas but keep getting errors.

    I wanted to convert the entire column into date format.

    Thanks!

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Date formatting trouble

    what does 1st jan look like
    and what does 31st may look like
    1st Nov v 11th Jan

    1112018 - could be either

    01012018 . or 112018

    05312018 or 5312018
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-07-2019
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    4

    Re: Date formatting trouble

    1st Jan looks like 112018

    31st May looks like 5312018

    Also looking closer it looks like something like Feb 8 is 2082018

    So the dates appear to be MDDYYYY in General format. I can just add the / between the numbers and it formats it into the actual date but there are 100s of them.

    Here is an example copied from the spreadsheet:

    1112018
    1112018
    1222018
    1242018
    1252018
    1252018
    1252018
    2062018
    2062018
    2062018
    2082018
    2082018
    2232018

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Date formatting trouble

    is 1112018 the 11th Jan pr 1st Nov

    do all the days with 1 digit always have a zero
    so
    an assumption
    1st jan would be

    1012018

    1222018
    is the 22nd Jan and NOT 2nd Dec - as that would be 12022018

    is that close ?

    7 characters - must be Jan to september
    8 characters are Oct , Nov, Dec , as they would start 10xxxx or 11xxxx 12xxxx
    because any day starts with a zero

    is that logic close ?

  5. #5
    Registered User
    Join Date
    02-07-2019
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    4

    Re: Date formatting trouble

    Yes, that is all correct - you got it!

    Jan to September are all 7 characters and all 1 character days have a 0

    October, November, and December are all 8 characters

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Date formatting trouble

    Try this
    Enter formula in B1 and copy down
    Format cells in Col B as Date
    Formula: copy to clipboard
    =TEXT(A1,"00-00-0000")/1

    v A B
    1 1222018 1/22/2018
    2 1112018 1/11/2018
    3 1112018 1/11/2018
    4 1222018 1/22/2018
    5 1242018 1/24/2018
    6 1252018 1/25/2018
    7 1252018 1/25/2018
    8 1252018 1/25/2018
    9 2062018 2/6/2018
    10 2062018 2/6/2018
    11 2062018 2/6/2018
    12 2082018 2/8/2018
    13 2082018 2/8/2018
    14 2232018 2/23/2018
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,108

    Re: Date formatting trouble

    AlKey appears to have given you a much simpler solution then I was going for

    =if( Len(A2)=7 , left(A2,1)&"/"&Mid(A2,2,2)&"/"&right(A2,4), left(A2,2)&"/"&Mid(A2,3,2)&"/"&right(A2,4))

  8. #8
    Registered User
    Join Date
    02-07-2019
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    4

    Re: Date formatting trouble

    Yes! AlKey, that worked beautifully!

    Thank you both so much for your help; it's greatly appreciated. It was getting pretty frustrating trying to figure it out.

+ 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. Trouble with date formatting
    By Arismac in forum Excel General
    Replies: 2
    Last Post: 07-08-2015, 10:52 PM
  2. formatting trouble
    By mercysakesalive in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-12-2014, 01:26 AM
  3. trouble formatting numbers
    By Randy42910 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-13-2014, 09:25 PM
  4. Percentage Formatting Trouble?
    By neilpateluk in forum Excel General
    Replies: 1
    Last Post: 02-12-2009, 02:28 PM
  5. Trouble formatting date
    By geordy67 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-26-2006, 09:35 PM
  6. Trouble formatting Date data
    By LB in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-01-2006, 07:15 AM
  7. [SOLVED] Trouble formatting
    By Jane in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-17-2005, 01:06 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