+ Reply to Thread
Results 1 to 5 of 5

Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA

  1. #1
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Smile Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA

    Hello, I am using Excel 2003 on Windows XP. Could some one please help me with a date conversion as follows:

    In column F (F2:F65000) I currently have dates in yyyy-mm-dd format (e.g. 1970-04-27).

    I need this date format to be changed to: dd mmm yy format (e.g. 27 Apr 70).

    Please refer to my attached image showing examples of the date formats:

    Examples of Date Formats.jpg

    I can do this manually, but I have 65,000 to do.

    Any assistance would be greatly appreciated,

    Kind regards,

    Chris
    Last edited by longbow007; 10-25-2012 at 07:36 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,609

    Re: Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA

    You should have posted a workbook, not a picture. If the cells are holding text values then you could use a helper column with:
    Please Login or Register  to view this content.
    , copied down.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Smile Re: Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA

    Hello protonLeah, thank you for your reply - much appreciated. Sorry I did not attach a workbook.

    I am now attaching a workbook extract that shows the dates in column F with the date format: yyyy-mm-dd format (e.g. 1970-04-27).

    I wish to change this format to: dd mmm yy format (e.g. 27 Apr 70).

    I need a macro that will automatically make these changes for the entire F Column because the users of this spreadsheet are all newbies to Excel.

    Please find attached a spreadsheet that has a small number of dates shown in Column F that are currently in the incorrect format: yyyy-mm-dd.

    Could you please help with your code so that it automatically changes these incorrect dates to the correct format: dd mmm yy.

    Kind regards,

    Chris
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-22-2012
    Location
    Zagreb, Croatia
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA

    Hi,
    if you insist on VBA solution, get this attachment...
    I understand that you are asking for VBA solution because of easy using, but i'd like to make your intention on fact that you can solve this problem with one additional column with following code (example for G2 cell):
    Please Login or Register  to view this content.
    and formatting this additional column as USER FORMAT - dd mmm yy
    Anyway, your VBA solution for colum F should be
    Please Login or Register  to view this content.
    as you can find in VBA module of attached file.


    Reagrds,
    Attached Files Attached Files
    Last edited by mnjofra; 10-25-2012 at 07:45 AM.
    If a post helps press star sign 4 my reputation

  5. #5
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Re: Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA

    Thanks mnjofra, your VBA solution works very well - greatly appreciated.

    Kind regards,

    Chris

+ 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