Google表格,日期格式为8位数字 [英] Google Sheets, 8 digit number to date format

查看:131
本文介绍了Google表格,日期格式为8位数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google表格从逗号分隔的文本文件中导入名称和日期列表。它可以很好地导入,但是当我尝试转换日期单元格时,会得到奇怪的结果。日期是8位数字,并按年,月,日排列。例如,我有这个日期。 20170425当我将其格式化为任何日期格式时,我得到57124-09-13。



我已经尽力想了一切,并且一直在寻找答案。



非常感谢任何可以引导我朝正确方向前进的人!

解决方案

添加了Excel标记后,请使用数据,文本到列,固定宽度,下一步,日期:YMD,完成。





对于


I am using Google Sheets to import a list of names and dates from a comma delimited text file. It imports fine but when I try to convert the date cells I get strange results. The dates are 8 digits long and arranged "year, month, day". for example, i have this date. 20170425 when I format it to any of the date formats I get 57124-09-13.

I've tried everything I can think of and searched forever for an answer.

Thanks so much in advance to anyone who can steer me in the right direction!

解决方案

Since you've added an Excel tag, use Data, Text to Columns, Fixed Width, Next, Date: YMD, Finish.

For , use this formula in an unused column,

=DATEVALUE(replace(replace(A1, 7, 0, "/"), 5, 0, "/"))

这篇关于Google表格,日期格式为8位数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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