在Excel中将日期和时间转换为ISO yyyy-mm-dd [英] Convert date and time to ISO yyyy-mm-dd in Excel

查看:74
本文介绍了在Excel中将日期和时间转换为ISO yyyy-mm-dd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我在Excel中打开的csv文件中,日期格式为"2014-08-28 09:03:19.789".

In a csv file which I have opened in Excel date is formated like "2014-08-28 09:03:19.789".

如何在Excel中将以上内容转换为yyyy-mm-dd(2014-08-28)?

How can the above be converted to just yyyy-mm-dd (2014-08-28) in Excel?

我试图将列设置为yyyy-mm-dd,但它没有改变.

I have tried to set the column to yyyy-mm-dd but it does not change.

推荐答案

在工作表单元格上使用 Text to Columns 向导,或者使用数据功能区►获取外部数据选项卡►来自文本.

Use the Text to Columns wizard either on the worksheet cell, or by Importing the file using the Data Ribbon ► Get External Data tab ► From text.

对于该列,选择 Space 作为定界符,然后在步骤3中选择YMD作为格式.完成后,根据需要自定义日期和时间列的格式.

For that column, select Space as the delimiter and, at Step 3, YMD for the format. When you are finished, custom format the date column and the time columns as you wish.

如果您需要在同一单元格中放置整个日期/时间戳,请在第三列中将它们添加在一起,并根据需要设置格式.

If you need the entire date/time stamp in the same cell, add them together in a third column, and format as needed.

这篇关于在Excel中将日期和时间转换为ISO yyyy-mm-dd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆