跳到主要內容

如何在Excel中的圖表/數據透視圖中更改日期格式?

通常,圖表或數據透視圖軸中的日期顯示為“2014-02-15“。在某些情況下,可能需要在諸如“2/15”,或僅將“月份”保留在“ “,您有什麼想法要完成嗎?本文提供了兩種方法來更改Excel中圖表軸或數據透視圖的日期格式。


在Excel中的數據透視表軸中更改日期格式

假設您已創建瞭如下所示的數據透視圖,並且可以按照以下方式在此數據透視圖的軸中更改日期格式:

1。 在數據透視圖中,右鍵單擊 日期 歸檔按鈕並選擇 現場設置 從右鍵單擊菜單中。

備註:在Excel 2007中,您無法在數據透視圖中找到字段按鈕,但是可以單擊 日期 提起 軸字段(類別) 部分 數據透視表字段列表 窗格並選擇 歸檔設置 從下拉列表中(請參見下面的屏幕截圖)。 而且此方法在Excel 2010和2013中也很好用。請參見上面的屏幕截圖。

2。 在出現的“字段設置”對話框中,單擊 數字格式 按鈕。

3.現在進入“設置單元格格式”對話框,單擊以突出顯示 習俗 ,在 類別 框,然後將格式代碼輸入到 類別 框中,然後單擊 OK 按鈕。 (備註:如果要將2014-01-03顯示為1/3,請鍵入 米/天類別 框; 如果要將2014-01-03顯示為Jan,請輸入 MMM類別 框。)

4。 點擊 OK 字段設置對話框中的按鈕。 然後,您將看到數據透視圖軸上的日期立即更改為指定的格式。 請參閱以下屏幕截圖:


在Excel中以圖表軸更改日期格式

例如,下面的圖表顯示了一個圖表,要更改Excel中普通圖表軸的日期格式,可以執行以下操作:

1。 右鍵單擊您將更改數據格式的軸,然後選擇 格式軸 從右鍵單擊菜單中。

2。 根據您的Microsoft Excel版本繼續:
(1)在Excel 2013的“格式軸”窗格中,展開 聯繫電話 組上 軸選項 標籤,輸入 米/天 or MMM 或其他人進入 格式代碼 框並單擊 加入 按鈕。
(2)在Excel 2007和2010的“格式軸”對話框中,單擊 聯繫電話 在左側欄中,將m / d或mmm或其他代碼輸入 格式代碼 框中,然後單擊 加入 按鈕。

Excel 2013及更高版本:
Excel 2007和2010:

備註:如果您輸入 米/天格式代碼 框,所選軸上的日期將更改為1 / 1、2 / 1等格式; 如果您輸入 MMM格式代碼 框,軸中的日期將更改為Jan,Feb,…的格式。

3。 關閉格式軸窗格/對話框。 然後,您將看到圖表軸中的日期立即更改為特定格式。


演示:在Excel的圖表軸或數據透視圖中更改日期格式


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you so much! Couldn't find the solution anywhere else
This comment was minimized by the moderator on the site
Number format doesn't exist in the field settings in Excel 2016/O365.
This comment was minimized by the moderator on the site
Hi Ben, In Excel 2019, 2016, or 365 you can also change the number format of Y axis in a PivotChart.
If you cannot find out the Date field button in the PivotChart, you can click the PivotChart to enable the PivotChart Fields pane, and then click the arrow right to the Date field, and select Field Settings from the drop-down list, and then change the number format in the popping out Field Settings dialog (same as that in Step 2 of method 1)
This comment was minimized by the moderator on the site
In the Field Settings there is no "Number Format" button in Excel 2016.
This comment was minimized by the moderator on the site
Great stuff!!! Really useful and helpful.
This comment was minimized by the moderator on the site
I have Excel 2013 and need to change the y-axis date format from MM/DD/YY to MM/YY. The y-axis is a date which Excel forces this date to be auto-calculated. My units are set to 30.5 increments to increment by month. The date does not always show the first day of the month due to the days variation (29, 30, 31). If I can change the date format from mm/dd/yy to mm/yy the auto-calculate date will work for the graph. Due to the Excel capability of the end-user of this graph, I need to avoid using VBA or macros. I cannot find a way to change an auto-generated number format in Excel 2013. Help?
This comment was minimized by the moderator on the site
Lovely... Trick and Its a great tip.. !
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations