I get excel sheets with dates like the following and have to constantly convert them to another date format: 190501 and want to create a formula to automatically convert this to 05/01/2019.
I get excel sheets with dates like the following and have to constantly convert them to another date format: 190501 and want to create a formula to automatically convert this to 05/01/2019.
Welcome to the forum!
Try this:
=DATE(YEAR(2000+LEFT(A1,2)),MONTH(MID(A1,2,2),DAY(RIGHT(A1,2))
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Or maybe...
=(MID(A1,3,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,2))+0 >> format as data how you desire
@Ali, your submission seems to be missing a parenthesis and the mid function should be 3 and not 2
HTH
Regards, Jeff
TryFormula:
Please Login or Register to view this content.
Or use text to columns, changing the date format dropdown in the last tab to YMD
Thanks, Jeff.
=DATE(YEAR(2000+LEFT(A1,2)),MONTH(MID(A1,3,2)),DAY(RIGHT(A1,2))
You might want to test that formula, Ali![]()
Another way:
A B C 2 190501 01 May 2019B2: =--TEXT(A1, "2\000-00-00")
Last edited by shg; 05-29-2019 at 02:44 PM.
Entia non sunt multiplicanda sine necessitate
You seem to be enjoying catching me out today, Jason!
You've corrected it in post #4, so no need for me to bother.
Last edited by jason.b75; 05-29-2019 at 01:44 PM.
Yup - one or two gaffs, but actually quite a lot that have been spot on today for me!!!
Kudos to SHG.
Alternatively, you can just use text to columns & select YMD
This helped! Thank you so much!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks