+ Reply to Thread
Results 1 to 21 of 21

Formula for different Data format in MMDDYYYY

  1. #1
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Formula for different Data format in MMDDYYYY

    Hi Gurus,
    I have a sheet with Date Column with different date formats which is in 'General' not date format
    Ex: the column contains - 31122024, 1152023,1220224 which is in DDMMYYYY format.
    I need the formula to convert all the above Date formats in MMDDYYYY format.
    Thanks in advance.
    I have attached the sample sheet.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,838

    Re: Formula for different Data format in MMDDYYYY

    Still using Excel 2010?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    01-13-2016
    Location
    Sheffield, England
    MS-Off Ver
    2016
    Posts
    216

    Re: Formula for different Data format in MMDDYYYY

    =text(if(len(a1)=7,date(right(a1,4),left(a1,1),mid(a1,2,2)),date(right(a1,4),left(a1,2),mid(a1,3,2))), "mmddyyyy")

  4. #4
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Formula for different Data format in MMDDYYYY

    Another possibility.

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

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,293

    Re: Formula for different Data format in MMDDYYYY

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,293

    Re: Formula for different Data format in MMDDYYYY

    No formulas
    Date-->Text to Columns-->Next-->Next-->Date-->DMY-->Finish
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Dear Gurus,
    Thanks for all your inputs, I really appreciate them. Despite trying all of your formulas and tricks, I am still not getting the correct result.
    I tried something as per the attached file.
    I want to correct only the row which is hightlighted in 'yellow' or suggest me anyother way, either
    i created the formula for zero.
    Attached Files Attached Files
    Last edited by jaffirahamed1; 03-04-2024 at 12:53 PM. Reason: Changed the actual attachment

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula for different Data format in MMDDYYYY

    See attached: 31/02/2024 is invalid date!
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  9. #9
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Formula for different Data format in MMDDYYYY

    I think I should stress it more clearly, my formula does it all, but you will need to change the year marker inside the sheet from "mm-dd-aaaa" to "mm-dd-yyyy".

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

  10. #10
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Dear DJ, I replaced year marker as 'YYYY', but still the same result unfortunately. Check the below image
    Attached Images Attached Images

  11. #11
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Please check the post #7, i have attached the sheet, where i have found the formula.

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula for different Data format in MMDDYYYY

    If the dates in column A are REAL dates (not TEXT which is what the format suggests!) then I simply formatted column B as "mm/dd/yyyy"

    in B2

    =A2

  13. #13
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Hi John, Yes, column A are REAL Dates to covert MM/DD/YYYY date format. Thanks.

  14. #14
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Formula for different Data format in MMDDYYYY

    In your sample there was this indication:
    DDMMYYYY
    09/02/2025

    No mention of 1/1/1900.

  15. #15
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Dear DJ, As per in the post #7 attachment, the entire column A is mix of DD/MM/YYYY, D/M/YYYY, DD/M/YYYY, D/MM/YYYY date formats with 'General' category which needs to change to MM/DD/YYYY completely
    Last edited by jaffirahamed1; 03-05-2024 at 12:02 AM.

  16. #16
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Formula for different Data format in MMDDYYYY

    ddmmyyyy isn't the same as dmyyyy of message #10, but its ok, you may not know the difference it makes.

  17. #17
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula for different Data format in MMDDYYYY

    See attached:

    Column A: Data >>> Text to Columns >>DMY

    Column F

    =A2

    Custom Format as MM/DD/YYYY
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Dear John, There should not manual intervention in the file, its like fully automated, the user just need to update the latest data to see the results immediately. thanks for understanding.

  19. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula for different Data format in MMDDYYYY

    I can only get the conversion to work via Text To Columns THEN transferring data to another column and formatting as MM_DD-YYYY.

  20. #20
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Thanks John. Your solution is great. i consider in my other reports. thanks.

  21. #21
    Registered User
    Join Date
    01-13-2011
    Location
    bangalore,india
    MS-Off Ver
    Microsoft 365 MSO (Version 2208 Build 16.0.15601.20858) 64-bit
    Posts
    24

    Re: Formula for different Data format in MMDDYYYY

    Any solution support here, I am waiting for your input? thanks in advance

+ 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. How to format date from MM/DD/YYYY to MMDDYYYY?
    By jasemhi in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-07-2022, 11:36 AM
  2. [SOLVED] Display dates in column as mmddyyyy
    By BG1983 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-01-2016, 12:39 PM
  3. [SOLVED] Trouble Formatting to mmddyyyy
    By BG1983 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-29-2016, 03:01 PM
  4. [SOLVED] add zero prefix to date and month (mmddyyyy) by using VBA
    By nareshkt in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-22-2014, 02:46 PM
  5. Convert DD to MMDDYYYY
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2013, 02:26 PM
  6. Replies: 2
    Last Post: 03-05-2010, 04:31 AM
  7. [SOLVED] I need to convert a series of DOB's from yyyymmdd to mmddyyyy
    By CoachCY in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2006, 10:55 AM

Tags for this Thread

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