更改Excel中的日期格式

发布于 2025-02-09 18:08:51 字数 91 浏览 0 评论 0原文

我有一个Excel数据集,该数据集具有以下示例格式: 20150102(Yyyy/dd/mm),

我想将其更改为格式(dd/mm/yyyy) 我该怎么做?

I have an excel dataset that has dates in the following example format:
20150102 (yyyy/dd/mm),

I want to change this to the format (dd/mm/yyyy)
How can I do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纸短情长 2025-02-16 18:08:51

这是其他几种其他方法,您可能会发现有用,

=--TEXT(A2,"0000\/00\/00")

=TEXT(A2,"0000\-00\-00")*1

​单元B4

=TEXT(A2,"0000\-00\-00")+0

•单元格中使用的公式B5

=TEXT(A2,"0000\-00\-00")/1

•Cell B6

=--TEXT(A2,"0000\-00\-00")

中使用的

=DATEVALUE(TEXT(A2,"0000-00-00"))

公式在单元格中使用B8

=TEXT(CONCAT(MID(A2,{1,2,3,4,5,6,7,8},1)),"0000\/00\/00")+0

•单元格中使用的公式B9

=TEXT(CONCAT(MID(A2,{1,5,7},{4,2,2})),"0000\/00\/00")+0

•Cell中使用的公式B10

=TEXTJOIN("/",,MID(A2,{1,5,7},{4,2,2}))+0

•Cell B11中使用的公式

=TEXT(TEXT(A2,"0000\/00\/00")+0,"dd/mm/yyyy")+0

•单元格中使用的公式b12

=TEXT(A2,"0000-00-00")+0

注意:由于应用公式后,将日期存储在excel中,因此,如果不将单元格式为Excel日期,则将显示为数字。因此,如果不格式,请选择单元格或范围,然后按ctrl+1 - > 格式单元格对话打开 - > 编号选项卡 - > 类别 - > 自定义 - >并通过删除常规作为dd/mm/yyyy键入

Here are few other alternative ways, which you may find useful,

enter image description here

• Formula used in cell B2

=--TEXT(A2,"0000\/00\/00")

• Formula used in cell B3

=TEXT(A2,"0000\-00\-00")*1

• Formula used in cell B4

=TEXT(A2,"0000\-00\-00")+0

• Formula used in cell B5

=TEXT(A2,"0000\-00\-00")/1

• Formula used in cell B6

=--TEXT(A2,"0000\-00\-00")

• Formula used in cell B7

=DATEVALUE(TEXT(A2,"0000-00-00"))

• Formula used in cell B8

=TEXT(CONCAT(MID(A2,{1,2,3,4,5,6,7,8},1)),"0000\/00\/00")+0

• Formula used in cell B9

=TEXT(CONCAT(MID(A2,{1,5,7},{4,2,2})),"0000\/00\/00")+0

• Formula used in cell B10

=TEXTJOIN("/",,MID(A2,{1,5,7},{4,2,2}))+0

• Formula used in cell B11

=TEXT(TEXT(A2,"0000\/00\/00")+0,"dd/mm/yyyy")+0

• Formula used in cell B12

=TEXT(A2,"0000-00-00")+0

Note: Since Dates are stored as numbers in Excel after applying the formulas it will show you as number if the cells are not priory formatted as Excel Dates. Hence if not formatted then please select the cell or range and press CTRL+1 --> Format cells Dialogue Opens --> Number Tab --> Category --> Custom --> and type by removing General as dd/mm/yyyy

Spring初心 2025-02-16 18:08:51

如果将201502存储为文本或号码,则尝试以下公式将其转换为DateValue。然后使用适当的单元格格式。

=DATE(LEFT(A1,4),MID(A1,5,2),DAY(RIGHT(A1,2)))

或使用text()函数直接获得所需的格式。尝试-

=TEXT(DATE(LEFT(A1,4),MID(A1,5,2),DAY(RIGHT(A1,2))),"dd/mm/yyyy")

If 20150102 is stored as text or number then try below formula to convert it datevalue. Then use proper cell format.

=DATE(LEFT(A1,4),MID(A1,5,2),DAY(RIGHT(A1,2)))

Or use TEXT() function to get desired format directly. Try-

=TEXT(DATE(LEFT(A1,4),MID(A1,5,2),DAY(RIGHT(A1,2))),"dd/mm/yyyy")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文