correcting date presented as general figures

Copper Contributor

I am looking for help on formatting dates in excel.

The system that spits out my data puts the date out in 'general' format.
E.g. for January 2023 it will say 202311 (meaning 2023/01/01)
for December 2023 it will say 2023121 (meaning 2023/12/01)
Ideally I am looking for dd/mm/yyyy, but will work with other regional displays if needed.
Note that it does not place any 0's before the month or day.
The day will always be 1

If I simply try to change the format from general to date, the figures are not the binary date value
e.g. for 202311 it will give me the date of 26/11/2453
In addition the 'general' format along with the missing 0's has me perplexed on how to account for this.

I tend to work with a few thousand rows a month, so manual adjustment are tedious.
Any thoughts on how to create a formula to create a proper date?

2 Replies
=DATE(LEFT(A2,4),LEFT(MID(A2,5,9),LEN(MID(A2,5,9))-1),1) where A2 is the date


Bit simplified

=DATE(LEFT(A2,4), MID(A2,5,3)/10, 1 )