Date format from mm/dd/yyyy hh:mm:ss AM/PM to dd/mm/yyyy

ggirf14

New Member
Joined
Nov 8, 2016
Messages
49
I cannot find an exact answer to handle the following dates:
3/30/2012 12:00:00 AM
04/02/2012 12:00:00 AM

Using Excel 2016 I tried
1- Formatting with custom dates including [$-409]mm/dd/yyyy hh:mm:ss AM/PM;@
2- Various versions of LEFT(TRIM(RIGHT(SUBSTITUTE...
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Good morning, I can't see the image in Post #9 , you need to upload it to a file sharing site and include the link in your post.

But let's try this, =CLEAN(A1)

where A1 is your data, what do you get afterwards? The CLEAN function removes All non-printable characters from imported data.
 
Upvote 0
Hope this link to image will work
view

https://drive.google.com/file/d/1BvObRX1rROlaIJprQSyX6-3jE4gt9Fe6/view?usp=sharing
link
view

Clean
view
does not help.
 
Upvote 0
Looks to me like your machine uses DD/MM/YYYY date notation. This may work:

=IF(ISNUMBER(O1),DATE(YEAR(O1),DAY(O1),MONTH(O1)),INT(SUBSTITUTE(MID(O1,FIND("/",O1)+1,99),"/","/"&LEFT(O1,FIND("/",O1)))))
 
Upvote 0
Did you confirm that your system is set to Regional Settings of dd-mm-yy?

Did you try Data | Text to Columns | date MDY ?



Excel 2010
ABC
2Data Text to Columns MDY
304/02/2012 12:00:00 AMApr 02, 2012
43/30/2012 12:00:00 AMMar 30, 2012
504/02/2012Apr 02, 2012Apr 02, 2012
63/30/2012Mar 30, 2012Mar 30, 2012
712/30/2017Dec 30, 2017Dec 30, 2017
81/30/2017Jan 30, 2017Jan 30, 2017
91/3/2017Jan 03, 2017Jan 03, 2017
105/8/2017May 08, 2017May 08, 2017
1110/20/2017Oct 20, 2017Oct 20, 2017
12
4b
Cell Formulas
RangeFormula
B5=DATE(RIGHT(A5,4),LEFT(SUBSTITUTE(A5,"/"," "),2),SUBSTITUTE(LEFT(RIGHT(A5,7),2),"/",""))
 
Upvote 0
Changing Regional Settings is not a setting I can consider to change in my work environment but I had a peak.
Strange setting Short date is set to dd/MM/yyyy
Long date are set to MMMM-dd-yy
Not sure of the impact having different order in short and long date format. That might have been why it was so tough to get Excel to understand the dates. New job, new computer settings ...

For the moment a big thank you to everyone for their efforts.
Steve the fish post # 14 is doing the job :) :) :)
https://drive.google.com/open?id=1akfTxzll29UzQUJbDhgqMYTtzZQIDs0_
Dave's last post #15 is not working for me.
Difinitely looks like regional settings date format may be the real root cause, a bit scary to learn Excel is not handeling the same with different regional setting.
I would like to understand more as I try to make my work as portable as possible.



Gilles Girard.







 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top