Convert text 202308 to date

jlr123

New Member
Joined
Mar 6, 2014
Messages
44
Crazy but I can't figure out how to convert 202308 from text to a date. Thanks for your assistance.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
What date is that supposed to represent, exactly?
It could be interpretted different ways.
 
Upvote 0
That is not a valid date in Excel.
A valid date needs a year, month, and day portion.

Should we just assume 1 for the day?
Or do you not really need a date, and just want a text value like "2023/08"?

If so, you can just use a formula like:
Excel Formula:
=LEFT(A1,4) & "/" & RIGHT(A1,2)
for a value in cell A1.
 
Upvote 0
I think the best would be date 2023/08/31. I have a column of dates that should return the last day of the month. thanks!
 
Upvote 0
For a date in cell A1, use this formula:
Excel Formula:
=EDATE(DATEVALUE(LEFT(A1,4) & "/" & RIGHT(A1,2)&"/01"),1)-1
and then apply your desired date format of "yyyy/mm/dd" on the cell.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,195
Messages
6,123,572
Members
449,108
Latest member
rache47

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