Convert DD/MM/YYYY HH:MM to MM/DD/YYYY HH:MM

%3CLINGO-SUB%20id%3D%22lingo-sub-2638142%22%20slang%3D%22en-US%22%3EConvert%20DD%2FMM%2FYYYY%20HH%3AMM%20to%20MM%2FDD%2FYYYY%20HH%3AMM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2638142%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20spreadsheet%20that%20I%20am%20working%20on%20and%20the%20dates%20that%20have%20been%20given%20on%20the%20sheet%20are%20in%20the%20European%20format%20(DD%2FMM%2FYYYY%20HH%3AMM)%2C%20but%20I%20need%20these%20converted%20to%20the%20US%20format%20(MM%2FDD%2FYYYY%20HH%3AMM).%20I%20have%20tried%20many%20different%20possible%20solutions%2C%20but%20have%20come%20up%20stumped%20after%20each%20one.%20Even%20converting%20the%20EUR%20format%20to%20a%20serial%20doesn't%20give%20the%20proper%20date%20when%20basing%20a%20cell%20format%20to%20dd%2Fmm%2Fyyyy%20hh%3Amm%20and%20then%20converting%20it%20to%20a%20date%20column.%20Anyone%20know%20of%20an%20easy%20(and%20possibly%20overlooked)%20solution%20to%20this%20issue%3F%20The%20data%20I%20have%20is%20converted%20from%20a%20.csv%20file%2C%20but%20during%20the%20import%20the%20offending%20columns%20are%20left%20as%20general%20and%20not%20converted%20to%20DMY%20since%20the%20time%20is%20also%20important.%20I%20would%20even%20take%20splitting%20the%20date%20from%20the%20time%20in%20different%20columns%20at%20this%20point%2C%20but%20I%20can't%20seem%20to%20come%20up%20with%20a%20solution%20to%20do%20this%20either%20because%20of%20the%20offending%20DD%2FMM%2FYYYY%20formatting.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2638142%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2638647%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20DD%2FMM%2FYYYY%20HH%3AMM%20to%20MM%2FDD%2FYYYY%20HH%3AMM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2638647%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1126339%22%20target%3D%22_blank%22%3E%40mindlessmama%3C%2FA%3E%26nbsp%3BHow%20exactly%20were%20these%20dates%20imported%3F%20You%20mentioned%20that%20the%20CSV%20file%20contains%20dates%20in%20the%20European%20style.%20Then%20it's%20important%20that%20you%20indicate%20upon%20import%20that%20these%20are%20European%20dates.%20In%20Text-to-columns%20(TTC)%2C%20for%20instance%2C%20you%20must%20indicate%20in%20Step%203%20of%203%20that%20these%20are%20dates%20%22DMY%22.%20Now%20Excel%20will%20transform%20the%20dates%20to%20your%20system%20locale%20and%20you%20can%20choose%20whatever%20formatting%20you%20want%20and%20the%20time%20portions%20are%20preserved.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20repeated%20the%20TTC%20steps%20described%20above%20and%20could%20transform%20the%20list%20of%20dates%20to%20what%20you%20find%20in%20the%20attached%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2638946%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20DD%2FMM%2FYYYY%20HH%3AMM%20to%20MM%2FDD%2FYYYY%20HH%3AMM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2638946%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1126339%22%20target%3D%22_blank%22%3E%40mindlessmama%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20a%20manual%20setting%20with%20cell%20formatting.%3C%2FP%3E%3CP%3EIt%20works%20for%20me%20(Excel%202016)%2C%20attached%20the%20file%20with%20the%20desired%20settings.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fformat-a-date-the-way-you-want-8e10019e-d5d8-47a1-ba95-db95123d273e%3Fui%3Den-US%26amp%3Brs%3Den-US%26amp%3Bad%3DUS%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EFormat%20a%20date%20the%20way%20you%20want%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFormat%20Code%20in%20Custom%3A%3C%2FP%3E%3CP%3EMM%2FDD%2FYYYY%20HH%3AMM%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWish%20all%20a%20nice%20day%20%2F%20night%20with%20lots%20of%20health%2C%20joy%20and%20love.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have a spreadsheet that I am working on and the dates that have been given on the sheet are in the European format (DD/MM/YYYY HH:MM), but I need these converted to the US format (MM/DD/YYYY HH:MM). I have tried many different possible solutions, but have come up stumped after each one. Even converting the EUR format to a serial doesn't give the proper date when basing a cell format to dd/mm/yyyy hh:mm and then converting it to a date column. Anyone know of an easy (and possibly overlooked) solution to this issue? The data I have is converted from a .csv file, but during the import the offending columns are left as general and not converted to DMY since the time is also important. I would even take splitting the date from the time in different columns at this point, but I can't seem to come up with a solution to do this either because of the offending DD/MM/YYYY formatting.

5 Replies

@mindlessmama How exactly were these dates imported? You mentioned that the CSV file contains dates in the European style. Then it's important that you indicate upon import that these are European dates. In Text-to-columns (TTC), for instance, you must indicate in Step 3 of 3 that these are dates "DMY". Now Excel will transform the dates to your system locale and you can choose whatever formatting you want and the time portions are preserved.

 

I repeated the TTC steps described above and could transform the list of dates to what you find in the attached workbook.

@mindlessmama 

Here is a manual setting with cell formatting.

It works for me (Excel 2016), attached the file with the desired settings.

 

Format a date the way you want

 

Format Code in Custom:

MM/DD/YYYY HH:MM

 

Wish all a nice day / night with lots of health, joy and love.

 

Nikolino

I know I don't know anything (Socrates)

@Riny_van_EekelenSo i retried this and during the import listed all of the DD/MM/YYYY HH:MM as DMY, but it still isn't recognized as such upon the import. I tried to reformat the fields after the import as dd/mm/yyyy hh:mm under custom, but it only adds leading zeros. It still will not show me the date as MM/DD/YYYY HH:MM as I need it to. Any ideas on how to break the date and time into separate cells? I'd gladly change the date after it is separated.

I have attempted this as well, but it still isn't reading the dates properly. It will read some, so long as the day displayed is less than 12. However with this the information is confused and European format 13/01/2019 is not recognized and 12/01/2019 is recognized as December 1, 2019 when converted to US format.
=IF(ISNUMBER(SEARCH(“/”,A1)),DATE(RIGHT(A1,4)*1,LEFT(A1,2),MID(A1,4,2)),IF(A1=0,””,A1))

untested, should work :))