Formula needed to convert a text based date to an M/D/YYYY format

jkinnick

New Member
Joined
Aug 31, 2016
Messages
12
Hi,

My sorce data date is May 2 2019 12:00AM and in a text format. I want to convert it to a date format of M/D/YYYY using a formula so that it reads 5/2/19. This formula must also work for double-digit days like May 13 2019 12:00AM will read 5/13/2019. I cannot change my source data so I need a formula that can do this in one fell swoop. Will someone please help me to write a formula that can do this?

Thanks,
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
hello

to understand which bit you want help with, it would help to see what you've done

regards
 
Upvote 0
does this work for you?

=TEXT("2-"&LEFT(A1,FIND(" ",A1)-1)&"-2019","M")&""&TRIM(MID(A1,FIND(" ",A1)+1,2))&""&MID(A1,FIND("20",A1)+2,2)
 
Upvote 0
does this work for you?

=TEXT("2-"&LEFT(A1,FIND(" ",A1)-1)&"-2019","M")&""&TRIM(MID(A1,FIND(" ",A1)+1,2))&""&MID(A1,FIND("20",A1)+2,2)

Thank you that worked! I just added the two /'s into the formula and it works great:

=TEXT("2-"&LEFT(A1,FIND(" ",A1)-1)&"-2019","M")&"/"&TRIM(MID(A1,FIND(" ",A1)+1,2))&"/"&MID(A1,FIND("20",A1)+2,2)
 
Upvote 0
If your data is in A3, then
=DATEVALUE(LEFT(SUBSTITUTE(A3," ",", ",2),FIND(":",A3)-2))

will return the excel serial date. The cell holding the formula can be formatted to your taste.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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