跳到主要内容

如何在Excel中将日期转换为工作日,月份,季度或年份?

假设您在一个单元格中输入日期,日期显示为2012/12/21。 有没有办法只显示年份,季度,月份或工作日? 以下方法可以帮助您轻松转换或格式化任何日期,以便在Microsoft Excel中仅显示工作日名称或月份名称或季度名称或年份名称。

使用公式将日期转换为工作日,月份,季度或年份

使用 Kutools for Excel 将日期转换为工作日、月份或年份


箭头蓝色右气泡 使用公式将日期转换为工作日,月份,季度或年份

Microsoft Excel的文本功能可以帮助您轻松地将日期转换为其相应的月份名称或年份名称或季度名称或工作日名称。

1.在空白单元格中,请输入此公式 = TEXT(A1,“ mmmm”),在这种情况下,位于单元格C1中。 看截图:


2。 按 输入 键,然后选择单元格C1。 然后将填充手柄拖到要应用此公式的范围内。 并且日期已转换为月份名称。 看截图:


如果要将这些月份的名称作为公式复制到其他位置,则需要将它们复制并粘贴为值。

您还可以使用以下公式将日期转换为工作日名称 = TEXT(A1,“ dddd”); 使用此公式将日期转换为季度名称 =“ Q”&LOOKUP(MONTH(A1),{1,4,7,10},{1,2,3,4})&“-”&TEXT(A1,“ yy”); 使用此公式将日期转换为年份名称 = TEXT(A1,“ yyyy ;;;”).


箭头蓝色右气泡 使用 Kutools for Excel 将日期转换为工作日、月份或年份

文字功能很容易处理几个日期,如果要输入多个日期,则将很费时间。 的 Kutools for Excel's 套用日期格式 工具可以帮助您轻松地将选择中的所有日期转换为年份名称或月份名称或工作日名称。

Kutools for Excel 包括300多个便捷的Excel工具。 30天免费试用,不受限制。 立即获取

1.选择要使用的范围。

2。 点击 库工具 > 格式化工具 > 套用日期格式…,请参见屏幕截图:


3.在 套用日期格式 对话:

如果要将日期转换为年份名称,可以选择 01or 2001 左侧框中的项目。


如果要将日期转换为月份名称,可以选择 03, 三月 or 三月 左侧框中的项目。


如果要将日期转换为工作日名称,则可以选择 星期三 or 周三 左侧框中的项目。


4。 然后点击 OK or 使用,所有日期都已更改为所需的日期格式。

备注:本 套用日期格式 工具不会更改实际值。 单击以了解有关此“应用日期格式”工具的更多信息。 


相关文章:

Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Your formula for converting to quarter & year is incorrect. Check it with data and you will find that July dates will be marked as 2nd quarter, not third.
This comment was minimized by the moderator on the site
[quote]Your formula for converting to quarter & year is incorrect. Check it with data and you will find that July dates will be marked as 2nd quarter, not third.By MP[/quote] Hello, We have updated it. Thanks for your feedback. :-)
This comment was minimized by the moderator on the site
[quote]Your formula for converting to quarter & year is incorrect. Check it with data and you will find that July dates will be marked as 2nd quarter, not third.By MP[/quote] Thanks for you reminder. I have corrected it, you can try the new formula if you want.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations