converting dates to correct format

假装没事ソ 提交于 2019-12-31 05:33:08

问题


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:


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


来源:https://stackoverflow.com/questions/57256239/converting-dates-to-correct-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!