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) 進入公式欄,然後按 Enter 鍵。 將“填充手柄”向下拖動到您需要從列表中獲取所有年份的範圍。

提取月份號

本節向您顯示從列表中獲取月份數的公式。

1.選擇一個空白單元格,複製並粘貼公式 = MONTH(A2) 進入公式欄,然後按 Enter 鍵。

2.將填充手柄向下拖動到所需的範圍。

然後,您將獲得日期列表的月份號。

提取天數

獲得日數的公式與上述公式一樣簡單。 請執行以下操作。

複製並粘貼公式 = DAY(A2) 進入空白單元格D2,然後按 Enter 鍵。 然後將“填充手柄”向下拖動到該範圍,以從引用的日期列表中提取所有日期。

現在,如上圖所示,從日期列表中提取了年,月和日的數字。


在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..