Formatting Dates

erind

New Member
Joined
Sep 22, 2009
Messages
32
I received an excel doc with a date column where the dates were all in different formats, some just dates and some with time stamps. I have removed the time stamps, and now I am trying to format the cells so that they are all the same. Currently they are showing as mm/dd/yyyy, but excel is reading it as dd/mm/yyyy, so when I try to format cells the only change i can make flips the month and day for half the numbers, and it is not recognizing the other values as proper dates (anything after the 13th of the month, as it thinks this is the month value).

Is there a way to tell excel that the dates are already showing as mm/dd/yyyy, and not the other way around?
 
Starting with a date of 11/12/2018 this changes to 43416, and then reformatted is 12/11/2018.

Starting with a date of 09/13/2018 this gets a results of #NUM !

The only value I replaced here is the A2 to refer to my cell. Is that how it should be? I wasn't sure what the 4, +1 or -1 are referring to.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You can't get 12/11/2018 with a format of dd mmm yyyy.
 
Upvote 0
Ahh, got it. So that changes the first half of my numbers to the correct date, 12-Nov-18, which I can now reformat to 11/12/2018. Perfect.

Any idea how to fix the other ones? They come up with an error: #NUM !
 
Upvote 0
Afraid not as a text string of 09/13/2018 converts to 13 Sept 2018 for me. Can you just put inthe formulas
=ISNUMBER(A2)
and
changing the A2 to the cell that contains 09/13/2018 and let me know what they return.
 
Upvote 0
=ISNUMBER(A2) results in FALSE

=LEN(A2) results in 7

For the previous date that we already figured out it returns TRUE and 16.
 
Upvote 0
7? are you sure sure that your cell isn't showing something like 9/13/18? If it was then you would get a NUM error.
 
Upvote 0
Try the formula below....

=IFERROR(IF(ISNUMBER(A2),VALUE(TEXT(A2,"mm/dd/yyyy")),DATE(RIGHT(A2,LEN(RIGHT(A2,LEN(A2)-FIND("@",SUBSTITUTE(A2,"/","@",LEN(A2)-LEN(SUBSTITUTE(A2,"/",""))))))),LEFT(A2,FIND("/",A2)-1),MID(A2,FIND("/",A2)+1,2))),DATE(RIGHT(A2,LEN(RIGHT(A2,LEN(A2)-FIND("@",SUBSTITUTE(A2,"/","@",LEN(A2)-LEN(SUBSTITUTE(A2,"/",""))))))),LEFT(A2,FIND("/",A2)-1),MID(A2,FIND("/",A2)+1,1)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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