Note: The other languages of the website are Google-translated. Back to English
登陆  \/ 
x
or
x
点此注册  \/ 
x

or

如何从Excel中的日期列表中提取或获取年,月和日?

对于日期列表,您知道如何提取或获取年,月和日的编号吗? 请参见下面的屏幕截图。 在本文中,我们将向您展示从Excel中的日期列表中分别获取年,月和日编号的公式。


从Excel中的日期列表中提取/获取年,月和日

以下面的日期列表为例,如果要从该列表中获取年,月,日的数字,请按以下步骤进行。

提取年号

1.选择一个用于查找年份的空白单元格,例如单元格B2。

2.复制并粘贴公式 =年(A2) 进入公式栏,然后按 输入 键。 将“填充手柄”向下拖动到您需要从列表中获取所有年份的范围。

提取月份号

本节向您显示从列表中获取月份数的公式。

1.选择一个空白单元格,复制并粘贴公式 = MONTH(A2) 进入公式栏,然后按 输入 键。

2.将填充手柄向下拖动到所需的范围。

然后,您将获得日期列表的月份号。

提取天数

获得日数的公式与上述公式一样简单。 请执行以下操作。

复制并粘贴公式 = DAY(A2) 进入空白单元格D2,然后按 输入 键。 然后将“填充手柄”向下拖动到该范围,以从引用的日期列表中提取所有日期。

现在,如上图所示,从日期列表中提取了年,月和日的数字。


在Excel中轻松更改所选日期范围内的日期格式

Kutools for Excel's 套用日期格式 实用程序可帮助您轻松地将所有日期格式更改为Excel中选定日期范围内的指定日期格式。
立即下载Kutools for Excel的全功能30天免费试用版!


最佳办公效率工具

Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%

  • 重用: 快速插入 复杂的公式,图表 以及您以前使用过的任何东西; 加密单元 带密码 创建邮件列表 并发送电子邮件...
  • 超级公式栏 (轻松编辑多行文本和公式); 阅读版式 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不会丢失数据; 拆分单元格内容; 合并重复的行/列...防止细胞重复; 比较范围...
  • 选择重复或唯一 行; 选择空白行 (所有单元格都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择...
  • 确切的副本 多个单元格,无需更改公式参考; 自动创建参考 到多张纸; 插入项目符号,复选框等...
  • 提取文字,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级滤镜 (将过滤方案保存并应用于其他工作表); 高级排序 按月/周/日,频率及更多; 特殊过滤器 用粗体,斜体...
  • 结合工作簿和工作表; 根据关键列合并表; 将数据分割成多个工作表; 批量转换xls,xlsx和PDF...
  • 超过300种强大功能。 支持Office / Excel 2007-2019和365。支持所有语言。 在您的企业或组织中轻松部署。 完整功能30天免费试用。 60天退款保证。
kte选项卡201905

Office选项卡为Office带来了选项卡式界面,使您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
officetab底部
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    rheen · 26 days ago
    this website help me to find what ive been searching all this time.. many thanks..
  • To post as a guest, your comment is unpublished.
    frank · 1 years ago
    This is stupid. Anyone who comes to this website wants the day of the month to populate into a cell! Anyone can plug in a random number into cell A2 and the click into cell B2 and insert the formula =A2. That's not what anyone is looking for that comes to this page. People want the cell to populate with the DAY OF THE MONTH!!!! This information and website is USELESS!!!
    • To post as a guest, your comment is unpublished.
      Charles · 10 months ago
      You wanted the actual day of the week or month?? Day of the week would be...

      =TEXT(B2,"dddd") for full day

      =TEXT(B704,"ddd") for 3 letter day like Mon, Tue, Wed etc

    • To post as a guest, your comment is unpublished.
      Khalysto · 10 months ago
      Did you actually read the site? The formula =DAY(A2) would extract the day of the month from whatever date you had entered in cell A2. How is that not what you're asking for?
      • To post as a guest, your comment is unpublished.
        Andy · 10 months ago
        No, that would extract the day number, not the actual day. I believe frank means he wants to see MON, TUE, WED etc.

  • To post as a guest, your comment is unpublished.
    acat · 1 years ago
    =MONTH(A2) drops the leading zero for single digit months. Having that cell formatted as Text does not solve. How to keep the leading zero?
    • To post as a guest, your comment is unpublished.
      Sonu Kumar Singh · 1 years ago
      =text(A2, "mmm") for month name in abbreviations


      =text(A2, "mmmm") for full month name
      • To post as a guest, your comment is unpublished.
        rheen · 26 days ago
        Thank u Sonu, u answered my question as well..