+ Reply to Thread
Results 1 to 5 of 5

Changing of date format

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    95

    Changing of date format

    Hello,

    Need help to change the date format form 25-12-2014, 26/12/2014 etc,,, to 2014-12-25. Please refer to Column M & N in the attached work sheet.

    Thanks in advance...
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Changing of date format

    wow, where does this data come from? none of those entries in column M are dates, they are all text that looks like a date, and no formatting will change that.

    Also in your expected results, although not a big deal, your 1st result is formatted as yyyy-mm-dd, and the rest is dd-mm-yyyy - which do you want?

    OK to keep this simple, in M4, remove that leading space, otherwise the formula becomes more complex, and it looks like that is the only entry with a leading space.

    Then use this to extract the date...
    =DATE(MID(M4,7,4),MID(M4,4,2),MID(M4,1,2))
    Format that as needed.

    You will still be left with some errors, because some of your "dates" actually have the month name in them, instead of the month number. I suggest you use filters to ID those and manually correct them - or use Find/Replace
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    09-07-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Changing of date format

    Hi,
    first remove the space in the cell(Date). then select the date range right click -> format cells-> change date format....
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-04-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    95

    Re: Changing of date format

    Quote Originally Posted by FDibbins View Post
    wow, where does this data come from? none of those entries in column M are dates, they are all text that looks like a date, and no formatting will change that.

    Also in your expected results, although not a big deal, your 1st result is formatted as yyyy-mm-dd, and the rest is dd-mm-yyyy - which do you want?

    OK to keep this simple, in M4, remove that leading space, otherwise the formula becomes more complex, and it looks like that is the only entry with a leading space.

    Then use this to extract the date...
    =DATE(MID(M4,7,4),MID(M4,4,2),MID(M4,1,2))
    Format that as needed.

    You will still be left with some errors, because some of your "dates" actually have the month name in them, instead of the month number. I suggest you use filters to ID those and manually correct them - or use Find/Replace
    Sorry Fdibbins, my mistake…

    I am working with a construction co. On a daily basis, I am getting this kind of work progress reports from different sources in different formats.. And I have to change the dates to this particular format before I upload in our Software.

    Anyways, your formula helps me a lot and time saving... Thank you so much for your help....

  5. #5
    Registered User
    Join Date
    04-04-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    95

    Re: Changing of date format

    Quote Originally Posted by ganeshkumar View Post
    Hi,
    first remove the space in the cell(Date). then select the date range right click -> format cells-> change date format....

    Thank you..

+ 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] Formula for Changing date format 3-12-13 to format d-mm-yy.
    By UNAB in forum Excel General
    Replies: 2
    Last Post: 04-08-2013, 03:52 PM
  2. [SOLVED] Changing Multiple sheet names by wk ending date for yr but need specific name/date format
    By kedeling in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2013, 02:40 PM
  3. Need help changing date to a sortable date format
    By slicksilver79 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 12-15-2011, 10:44 AM
  4. Formula required for date without changing the date format
    By suryaprasad in forum Excel General
    Replies: 1
    Last Post: 01-28-2009, 08:04 AM
  5. [SOLVED] Changing date serial numbers to date format
    By rdunne in forum Excel General
    Replies: 1
    Last Post: 04-14-2005, 08:06 AM

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