Recognizing output as date

aprabhat

New Member
Joined
May 18, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I'm getting outputs from an auto-generating report in the following format. Excel recognizes it as "General" and I'm struggling to convert it to a recognizable date format. Don't care about the time stamp (MM/DD/YYYY would work). Any help is really appreciated!
Mar 01 2020 00:00:00
Apr 19 2020 00:00:00
Apr 25 2020 00:00:00
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
The first option may suffice.
N.B. If your system uses USA settings, you will have to reverse parts of C2:C3, my system's regional settings are dd-mmm-yy.

T202007b.xlsm
ABC
1Option 1Option 2
2Mar 01 2020 00:00:0001-Mar-202001-Mar-2020
3Apr 19 2020 00:00:0019-Apr-202019-Apr-2020
4
3a
Cell Formulas
RangeFormula
B2:B3B2=DATE(MID(A2,8,4),MONTH(1&LEFT(A2,3)),MID(A2,5,2))
C2:C3C2=--(MID(A2,5,2)&LEFT(A2,3)&MID(A2,8,4))
 
Upvote 0
If your computer is set to US locale, then this formula should also work...

=0+REPLACE(A1,7,0,",")

You will have to format the cell you place this formula in with the date format of your choice though.
 
Upvote 0
Thanks, Dave and Rick ? ! Both approaches worked. I am in the US, so going to follow Rick's formula
 
Upvote 0
Thanks for the feedback.
Rick's suggestion also works with my setting with dates dd-mm-yy
I had tried Substitute but I didn't try Replace.

T202007b.xlsm
ABCD
1Option 1Option 2Rick's
2Mar 01 2020 00:00:0001-Mar-202001-Mar-202001-Mar-2020
3Apr 19 2020 00:00:0019-Apr-202019-Apr-202019-Apr-2020
4
3a
Cell Formulas
RangeFormula
B2:B3B2=DATE(MID(A2,8,4),MONTH(1&LEFT(A2,3)),MID(A2,5,2))
C2:C3C2=--(MID(A2,5,2)&LEFT(A2,3)&MID(A2,8,4))
D2:D3D2=0+REPLACE(A2,7,0,",")
 
Upvote 0
Rick's suggestion also works with my setting with dates dd-mm-yy
Hmm, I could have sworn I made that same suggestion (putting the comma in after the day number for mmm dd yyyy text strings) in the past and was told it did not work for non-US locales. I guess I must be remembering that incorrectly. Thanks for letting me know it works for you also.
 
Upvote 0
I edited the formulas so that they would work with 1 digit or 2 digit days.

T202007b.xlsm
ABCE
1Option 1 +Rick's +Option 2 +
2Mar 01 2020 00:00:0001-Mar-202001-Mar-202001-Mar-2020
3Apr 19 2020 19-Apr-202019-Apr-202019-Apr-2020
4Mar 6 202006-Mar-202006-Mar-202006-Mar-2020
5Mar 17 202017-Mar-202017-Mar-202017-Mar-2020
3a
Cell Formulas
RangeFormula
B2:B5B2=DATE(MID(A2,FIND(" ",A2,5)+1,4),MONTH(1&LEFT(A2,3)),MID(A2,5,2))
C2:C5C2=--REPLACE(A2,FIND(" ",A2,5),0,",")
E2:E5E2=--(MID(A2,5,2)&LEFT(A2,3)&MID(A2,FIND(" ",A2,5)+1,4))
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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