converting dates to correct format

2020-05-01 03:50发布

I have a data set were some of the dates in UK format and others are in US Format

6/28/2019   07/01/2019
6/28/2019   07/01/2019
6/28/2019   07/01/2019
6/28/2019   07/01/2019
6/28/2019   07/01/2019

what would be the best way to convert them all into the standard UK format

1条回答
放荡不羁爱自由
2楼-- · 2020-05-01 04:43

Without seeing your data, I do believe all your dates are in the same format actually, mm/dd/yyyy. I have not seen any dataset that deliberately would mix two formats together. Some of the dates just happen to be legal dates in your UK version, e.g.: 7-1-2019 can be both 7th of january but most likely is meant to be 1st of july.

One of the easiest way to quickly convert these dates is to:

  • Hightlight the column the dates are in.
  • From the Data Ribbon, Choose “Text to Columns”
  • Choose “Delimited”, and unselect all delimiters
  • Click next and under Column data format choose Date format MYD
查看更多
登录 后发表回答