+ Reply to Thread
Results 1 to 9 of 9

convert date in yyyy/mm/dd format

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    94

    convert date in yyyy/mm/dd format

    Hello,

    In the attached sheet, I want a macro which will convert the date from dd-mon-yyyy to yyyy/mm/dd format for the two columns.

    Can anyone help me.

    Advance thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: convert date in yyyy/mm/dd format

    Why do you need a macro? Is there an issue with simply formatting those columns with the desired date format?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: convert date in yyyy/mm/dd format

    Thanks for your quick response

    In my project, i am using more than 20 macro to generate the output which I got from Oracle.
    If a macro is developed to format the date in requested format, then it will be easier for the end user without using excel formula.

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: convert date in yyyy/mm/dd format

    Please Login or Register  to view this content.
    Are you asking that the dates seperated by commas be formatted also? Are they supposed to be separated into their own cells?

  5. #5
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: convert date in yyyy/mm/dd format

    Thanks solus for your help.
    I forgot to add one more point. Please check the newly attached sheet once again where I have added date with time also.

    How the macro will work and display only date (excluding time)
    Attached Files Attached Files

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: convert date in yyyy/mm/dd format

    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    16,668

    Re: convert date in yyyy/mm/dd format

    Try this
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-07-2013
    Location
    zurich
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: convert date in yyyy/mm/dd format

    Thanks to both of you for looking into the matter.

    Macro is working perfectly, as given by Solus.
    Dear Jindon, the date is not being converted

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    16,668

    Re: convert date in yyyy/mm/dd format

    Should work.
    Attached Files Attached Files

+ 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. [SOLVED] Convert date format to (dd/mm/yyyy)
    By nur2544 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-11-2013, 09:40 AM
  2. [SOLVED] Automatically convert Date format M/D/YYYY TO DD/MM/YY
    By satputenandkumar0 in forum Excel General
    Replies: 11
    Last Post: 11-26-2012, 08:26 AM
  3. [SOLVED] Convert Date Format from yyyy-mm-dd to dd mmm yy using VBA
    By longbow007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2012, 07:36 AM
  4. [SOLVED] Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy inVB
    By Boormo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-05-2012, 05:48 PM
  5. hot to convert a date object into a text (format yyyy-mm-dd)
    By xianwinwin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-12-2007, 12:07 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