+ Reply to Thread
Results 1 to 8 of 8

date conversion

  1. #1
    Registered User
    Join Date
    03-02-2007
    Posts
    3

    date conversion

    How can I convert this date expression "19410712" to "January 12, 1941" or "1/12/1941"?

  2. #2
    Registered User
    Join Date
    03-01-2007
    Posts
    41
    Quote Originally Posted by ljw
    How can I convert this date expression "19410712" to "January 12, 1941" or "1/12/1941"?
    I think u can go to data -> text to columns -> choose fixed width and separate the text into 1941,07,12...after that use concatenate function(e.g. =concatenate(A3,"/",A2,"/",A1).)

  3. #3
    Registered User
    Join Date
    03-01-2007
    Posts
    41
    or u can try tis out
    =CONCATENATE(MID(A1,7,2),"/",MID(A1,5,2),"/",MID(A1,1,4))
    Juz put your text in A1...

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by ljw
    How can I convert this date expression "19410712" to "January 12, 1941" or "1/12/1941"?
    I can see where the 1941 comes from, but not sure how you get January out of either 07 or 12, but try these

    =MID(A1,5,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,4) this will give a text result of 07/12/1941

    =1*(RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4)) custom format to "mmmm dd, yyyy" without the " "

    =TEXT(A1,"0000-00-00")*1 custom format to "mm/dd/yyyy" without the " "


    Re-edited
    Last edited by oldchippy; 03-02-2007 at 05:50 AM.
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    03-02-2007
    Posts
    3
    Quote Originally Posted by oldchippy
    I can see where the 1941 comes from, but not sure how you get January out of either 07 or 12, but try these

    =MID(A1,5,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,4) this will give a text result of 07/12/1941

    =1*(RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4)) custom format to "mmmm dd, yyyy" without the " "

    =TEXT(A1,"0000-00-00")*1 custom format to "mm/dd/yyyy" without the " "


    Re-edited
    ***
    I apologize for not reading the date correctly. Late nite here. Thanks for your help.

    Quote Originally Posted by wei82
    I think u can go to data -> text to columns -> choose fixed width and separate the text into 1941,07,12...after that use concatenate function(e.g. =concatenate(A3,"/",A2,"/",A1).)
    ***
    ***
    Thanks for the simple fix. I apologize for misreading the date.

    Thank you all for the help. Somewhat new at this!
    Last edited by VBA Noob; 03-02-2007 at 09:20 AM.

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to help - thanks for the feedback

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You can actually convert such dates in situ, with Text to columns without having to split and concatenate....

    Select column of dates
    Data > Text to columns > Next > Next
    At step 3 choose "date" under "column data format" and YMD option
    Finish

  8. #8
    Registered User
    Join Date
    03-02-2007
    Posts
    3
    Quote Originally Posted by daddylonglegs
    You can actually convert such dates in situ, with Text to columns without having to split and concatenate....

    Select column of dates
    Data > Text to columns > Next > Next
    At step 3 choose "date" under "column data format" and YMD option
    Finish
    ***

    So simple! Learned much from this community. Hope I can reciprocate. Thank you all from the windy isle of Avalon in southern NJ.

+ 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