rainbowthug
rainbowthug

Reputation: 77

Convert date Excel

Trying to convert Italian date. I got dates from pdf like 21 Giu 2020 which I paste into Excel and then try to format cells and choose option "Date" and 14-mar-12 there but it does not respond. It does only when I change 21 Giu 2020 to 21.12.2020 then it is 21-giu-2020.

Is there any way to automate it, else I need to search upon Italian months and conver Ago to 08, Giu to 12 etc etc?

Upvotes: 0

Views: 114

Answers (1)

JvdV
JvdV

Reputation: 75990

If your locale isn't Italian, I doubt that Excel would ever recognize a string like that as a date. Here is a formula that would create the date for you:

=DATE(RIGHT(A1,4),MATCH(MID(A1,4,3),TEXT(DATE(2020,SEQUENCE(12),1),"[$-410]mmm"),0),LEFT(A1,2))

The avobe usage of SEQUENCE requires ExcelO365. I also made the assumption your text is always in the pattern "dd mmm yyyy".

You'll end up with a date which you can then use number formatting of your liking.

enter image description here

Upvotes: 1

Related Questions