跳到主要内容

如何在Excel中的图表/数据透视图中更改日期格式?

通常,图表或数据透视图轴中的日期显示为“2014-02-15“。在某些情况下,可能需要在诸如“2/15”,或仅将“月份”保留在“二月“,您有什么想法要完成吗?本文提供了两种方法来更改Excel中图表轴或数据透视图的日期格式。


在Excel中的数据透视表轴中更改日期格式

假设您已经创建了一个数据透视图,如下图所示,您可以按以下方式在此数据透视图的轴上更改日期格式:

1。 在数据透视图中,右键单击 日期 归档按钮并选择 字段设置 从右键单击菜单中。

备注:在Excel 2007中,您无法在数据透视图中找到字段按钮,但是可以单击 日期 提起 轴字段(类别) 部分 数据透视表字段列表 窗格并选择 归档设置 从下拉列表中(请参见下面的屏幕截图)。 而且此方法在Excel 2010和2013中也很好用。请参见上面的屏幕截图。

2。 在出现的“字段设置”对话框中,单击 数字格式 按钮。

3.现在进入“设置单元格格式”对话框,单击以突出显示 定制版 ,在 产品分类 框,然后将格式代码输入到 Type 框,然后单击 OK 按钮。 (备注:如果要将2014-01-03显示为1/3,请键入 米/天Type 框; 如果要将2014-01-03显示为Jan,请输入 MMMType 框。)

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的图表轴或数据透视图中更改日期格式


Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 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