跳到主要內容

如何在Excel中將日期轉換為工作日,月份,季度或年份?

假設您在一個單元格中輸入日期,它顯示為2012/12/21。 有沒有辦法只顯示年份,季度,月份或工作日? 以下方法可以幫助您輕鬆轉換或格式化任何日期,以便在Microsoft Excel中僅顯示工作日名稱或月份名稱或季度名稱或年份名稱。

使用公式將日期轉換為工作日,月份,季度或年份

使用Kutools for Excel將日期轉換為星期幾,月份或年份


箭頭藍色右氣泡 使用公式將日期轉換為工作日,月份,季度或年份

Microsoft Excel的文本功能可以幫助您輕鬆地將日期轉換為其相應的月份名稱或年份名稱或季度名稱或工作日名稱。

1.在空白單元格中,請輸入此公式 = TEXT(A1,“ mmmm”),在這種情況下,位於單元格C1中。 看截圖:


2。 按 Enter 鍵,然後選擇單元格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將日期轉換為星期幾,月份或年份

文本功能很容易處理幾個日期,如果要設置多個日期,則將很費時間。 的 Excel的Kutools's 套用日期格式 工具可以幫助您輕鬆地將選擇中的所有日期轉換為年份名稱或月份名稱或工作日名稱。

Excel的Kutools 包括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