简体   繁体   中英

Formatting MDY dates as MY

I have a formatting issue with dates in Excel 2013. I'm from Argentina and I have the English version of Windows 7 with the Argentinean date format dd/mm/yyyy . I have 5,000 lines with dates with the USA format mm/dd/yyyy HH:MM:SS . For some reason when I try to give format to these dates Excel thinks they are in dd/mm/yyyy format. That messes up all the formatting.

I'm trying to obtain mm/yyyy .

Is there any way to use a formula to obtain that format? Instead of using Excel common formatting.

If all the formatting is consistent then:

=DATE(MID(A1,7,4),MID(A1,1,2),MID(A1,4,2))+RIGHT(A1,8)  

copied down should convert from USA (strings in ColumnA) to UK format and yield results that Excel recognises as date/time serial numbers (so may be formatted mm/yyyy).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM