+ Reply to Thread
Results 1 to 11 of 11

Change date format from mm/dd/yy to dd/mm/yyyy

  1. #1
    Registered User
    Join Date
    11-27-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    Office 365
    Posts
    9

    Change date format from mm/dd/yy to dd/mm/yyyy

    Hi,
    I've been searching to convert date format automatically from mm/dd/yy to dd/mm/yyyy. Any help on this is really appreciated.

  2. #2
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    Assuming your date is in A1, try this...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You'll probably need to format the cell to Date when done to see the correct format.

    Though, from experience, date manipulations within Excel can get a bit messy.
    Last edited by PaulSP8; 11-27-2019 at 04:32 AM. Reason: Added formatting note.

  3. #3
    Registered User
    Join Date
    11-27-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    it works but only for dates after 11/13/19, but before that it gives #value.

    Please see attached file.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-27-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    I have a formula that works to convert mm/dd/yyyy to dd/mm/yyyy. But when excel got value to 11/13/19 then it gets confused.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Thats basically two formulas one for mm/dd/yyyy and second for mm/dd/yy. I need one formula for both types.


    Thanks

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    Its a pain, but the below as long as all your dates are after 2000
    =IF(ISNUMBER(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(2000+RIGHT(A2,2),LEFT(A1,2),MID(A2,4,2)))

    your value, if it is a number (date) just needs the month and day swapping. otherwise when it is text, you create the date as shown, but need to add 2000 to the year

  6. #6
    Registered User
    Join Date
    11-27-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    Thanks! but I'm confused why is Cell value C13 is different??

    See attached file
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    Because I am not awake!
    =IF(ISNUMBER(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(2000+RIGHT(A2,2),LEFT(A2,2),MID(A2,4,2)))

    try the above

  8. #8
    Registered User
    Join Date
    11-27-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    WOW! Great! and Thanks. It only works for years above 2000. Right?

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    yes
    your problem is with 2 digit dates asigning them to a year, we have to guess which 4 digit year you mean. the below may be a work around if needed

    =IF(ISNUMBER(A2),DATE(YEAR(A2),DAY(A2),MONTH(A2)),DATE(IF(RIGHT(A2,2)<50,2000,1900)+RIGHT(A2,2),LEFT(A2,2),MID(A2,4,2)))

    you could refine it as above, where if the year is <50 its 2049 above 50 1950 etc change the red for a number that suites your purposes

  10. #10
    Registered User
    Join Date
    06-26-2019
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    26

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    Hi Rahat,

    I think you may be looking for a complicated solution. Hopefully what I suggest below is easier to user.

    1) (not mandatory, but will help double check you get the desired result) - Format the date cells to Format dd-mmm-yy. It does give you a peculiar result initially, but ignore it.
    2) Highligh the date cells
    3) On the Data Ribbon, select Text to Columns
    4) Choose Fixed Width, and click Next
    5) DO NOT choose to split the dates, just leave as is. JUST CLICK NEXT
    6) Select the Date Button and in the drop down select MDY
    7) Click OK and it should drop ou the dates to the format you want.

    Hope that Helps
    Green Aardvard

  11. #11
    Registered User
    Join Date
    11-27-2019
    Location
    Karachi, Pakistan
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Change date format from mm/dd/yy to dd/mm/yyyy

    Nice and easy solution but when I copy data from another source it gives same formatting and I have to manually to it again. I think the formula solution given by davsth is fine. Thanks for your valuable reply.

+ 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. Replies: 3
    Last Post: 04-25-2019, 11:05 AM
  2. How to change date format dd/mm/yyyy to mm/dd/yyyy ?
    By maddyrafi1987 in forum Excel - New Users/Basics
    Replies: 27
    Last Post: 05-13-2017, 02:23 AM
  3. Macro to change Date Format mm-dd-yyyy to dd-mm-yyyy
    By sriku in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2014, 08:34 AM
  4. Replies: 8
    Last Post: 10-02-2013, 06:23 PM
  5. Date Format Change dd-mm-yyyy to dd-mon-yyyy
    By NAGRAJ in forum Excel General
    Replies: 3
    Last Post: 08-09-2013, 10:20 AM
  6. [SOLVED] how do I change date from mm/dd/yyyy to dd:mm:yyyy format in Excel
    By Jack Wilson in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-18-2006, 09:00 AM
  7. change date format from dd/mm/yyyy to mm/yyyy
    By flow23 in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 11:40 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