跳到主要內容

如何在Excel中將日期和時間從一個單元格拆分為兩個單獨的單元格?

例如,您有一個混合了日期和時間的數據列表,您想將它們分成兩個單元格,一個是日期,另一個是時間,如下面的屏幕快照所示。 現在,我為您提供兩種快速的方法來在Excel中解決它。


如果使用複制和粘貼功能一次一個地複制每個日期和時間,那是浪費時間。 這裡有一些公式可以幫助您快速拆分日期和時間。

1.選擇您要僅放置日期結果的列範圍,然後右鍵單擊以選擇 單元格格式 從上下文菜單中。 看截圖:
doc分割日期時間2

2。 在裡面 單元格格式 對話框,在數字選項卡下,單擊 日期 類別 部分,轉到 類別 列表以選擇所需的日期類型。 看截圖:doc分割日期時間3

3。 點擊 OK 關閉對話框。 然後選擇另一個只想放置時間的列範圍,並將其格式化為所需的時間類型。 看截圖:doc分割日期時間4

4。 點擊 OK 關閉 單元格格式 對話。 然後在 日期 列(標題除外),請輸入以下公式 = INT(A2) (A2是您需要拆分的單元格),然後將填充手柄拖動到應用此公式所需的範圍。 查看屏幕截圖:
doc分割日期時間5doc分割日期時間6

5.轉到“時間”列的第一個單元格(標題除外),然後鍵入此公式 = A2-C2 (A2是拆分的單元格,C2是日期單元格),然後將填充手柄拖到所需的範圍內。 查看屏幕截圖:

doc分割日期時間7
doc箭頭
doc分割日期時間8

然後將日期和時間分為兩個單元格。


分割日期和時間最簡便的方法是應用 分裂細胞 的效用 Excel的Kutools, 毫無疑問!

Excel的Kutools, 與以上 300 方便的功能,使您的工作更加輕鬆。 

安裝後 Kutools for Excel,請執行以下操作:(立即免費下載Kutools for Excel!)

1.選擇日期時間單元格,然後單擊 庫工具 > 合併與拆分 > 分裂細胞。 看截圖:
doc分割儲存格01

2。 在裡面 分裂細胞 對話框,檢查 拆分為列宇宙 選項。 看截圖:
doc分割儲存格2

3。 點擊 Ok 並選擇一個單元格以輸出分隔的值,然後單擊 OK。 看截圖:
doc分割儲存格3

現在,這些單元已被劃分為單獨的日期和時間。
doc分割儲存格4

小費。 使用“拆分單元格”實用程序,您可以按定界符或固定寬度將單個單元格拆分為行或列。 如果您想免費試用“分裂細胞”功能, 請免費試用Kutools for Excel 首先,然後按照上述步驟進行操作。


從DateTime中刪除時間

在Excel中,要從12年11月31日1:21:2017中刪除12:11:31並將其精確地設置為1年21月2017日,您可能需要花一些時間來創建公式來處理此工作。 然而 從日期中刪除時間 的效用 Excel的Kutools 可以快速從Excel中的日期時間格式中永久刪除時間戳。 點擊下載 30 天免費試用.

文檔轉換日期-unix-1

借助方便的實用程序– 提取文字 of Excel的Kutools,您還可以從一列到兩列快速提取日期和時間。

安裝後 Kutools for Excel,請執行以下操作:(立即免費下載Kutools for Excel!)

1.首先,您需要將單元格格式化為日期和時間。 選擇一個列範圍並右鍵單擊以選擇 單元格格式 從上下文菜單中。 然後在 單元格格式 對話框中單擊 日期分類 部分,然後選擇一種日期類型。 查看屏幕截圖:
doc分割日期時間15

2。 點擊 OK。 然後轉到另一個列範圍,並將其格式化為時間。 看截圖:
doc分割日期時間16

3.選擇日期和時間單元格(標題除外),然後單擊 庫工具 > 文本 > 提取文字。 看截圖:
doc提取文字1

4.然後在 提取文字 對話框,輸入 *空間文本 框,然後單擊 加入 將其添加到 提取清單。 查看屏幕截圖:

doc分割日期時間18  doc分割日期時間19

5。 點擊 Ok 並選擇一個單元格以放置日期。 看截圖:

doc分割日期時間20

6。 點擊 OK。 您可以看到已提取日期數據。
doc分割日期時間21

7.再次選擇日期和時間數據,然後單擊 庫工具 > 文本 > 提取文字。 並刪除提取列表的所有條件,然後鍵入 空間 * 文本 框並將其添加到 提取清單。 查看屏幕截圖:

doc分割日期時間22   doc分割日期時間23

8。 點擊 Ok 選擇要顯示結果的單元格,然後單擊 OK 關閉對話框。 現在,數據已分為幾列。
doc分割日期時間24

注意: 您可以根據需要將空間更改為其他分隔符。

小提示: 使用“提取文本”可以按子字符串快速提取數據。 實際上,在Kutools for Excel中,您可以提取電子郵件,拆分名字,中間名和姓氏,將字符串轉換為日期等。如果您想免費試用“提取文本”功能,請免費下載Kutools for Excel 首先,然後按照上述步驟進行操作。


在Excel中,還可以使用“文本到列”將“日期和時間”列拆分為各列。

1.選擇數據范圍,然後單擊 數據 > 文本到列,然後在彈出的對話框中檢查 分隔 選項。 看截圖:

doc分割日期時間9
doc箭頭
doc分割日期時間10

2。 然後點擊 下一頁 打開 將文本轉換為列嚮導步驟2之3 對話框,檢查 宇宙 (您也可以根據需要選擇其他定界符) 定界符 部分。 看截圖:
doc分割日期時間11

3。 點擊 關閉對話框,然後將數據范圍分為幾列。 選擇日期範圍,然後右鍵單擊以選擇 單元格格式 從上下文菜單中。 看截圖:
doc分割日期時間12

4.然後在 單元格格式 對話框中單擊 日期 分類 部分,然後在下面選擇所需的日期類型 類別 部分。 看截圖:
doc分割日期時間13

5。 點擊 OK。 現在結果顯示如下:
doc分割日期時間14

備註:您最好在使用“文本到列”之前複製原始數據,因為這會破壞原始數據。

最佳辦公生產力工具

🤖 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 (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
when I try to split the date it does not work cause it see the first fields as month instead of day I try to custom format with no clue
This comment was minimized by the moderator on the site
Hi, Lojain Lafi, I have create a list of dates which the first fields are days as the picture uploaded seen.The first method can work. But be sure that, the dates are still strored as numbers in your sheet, otherwise the formula INT() cannot to get the correct result.
To make sure the dates are numbers stored in Excel, you can type the dates in standarded format firstly, such as 3/12/2022 4:12:30 (m/d/yyyy hh:mm:ss), then select them to format to a custom formatting d/m/yyyy hh:mm:ss. Now the first field in the date is day, but the date also stored as number in Excel, you can use above methods to split datetime into two columns.
This comment was minimized by the moderator on the site
002/18-19 / 5-4-2018 this is bill no and date, plz guide me how to make saprate coloum of this two?
This comment was minimized by the moderator on the site
Hello, Avinash Wadkar, could you tell me clearly which one is bill number and date? If 002/18-19 is the bill no, and 5-4-2018 is the date, just using text to columns utility, and split them by space.
This comment was minimized by the moderator on the site
Date format is 3162018 so how can I convert that in 03/16/2018.pls provide easy way to perform for large data.
This comment was minimized by the moderator on the site
Use formula =TEXT(A1,"00000000") to add leading zeros to the strings, then copy the results and paste them as values, then use this formula =DATE(RIGHT(C1,4),MID(C1,3,2),LEFT(C1,2)) to convert them to the standard date format.
This comment was minimized by the moderator on the site
Hi! This article has been useful to me. Thank you.
This comment was minimized by the moderator on the site
when i split this date and time
10/25/2017 13:57
10/25/2017 17:49



it splits into


25/09/2017
where in my original data month is october


please any suggestions
This comment was minimized by the moderator on the site
Thanks for your leaving message, which method you use to split the date time? I have tried many times, above methods split date time mm/dd/yyyy hh:mm into separate columns well.
This comment was minimized by the moderator on the site
18452/1-Apr-2015 how to sort this data date and bill no.
This comment was minimized by the moderator on the site
18452/1-Apr-2015 HOW TO SORT THIS DATA IN EXCEL 18452 IS BILL NO OR DATE PLEASE MAKE ME HELP
This comment was minimized by the moderator on the site
SELECTE 18452 AND GO TO FORMAT CELL AND SELCET DATE.
This comment was minimized by the moderator on the site
it is very very important for me. thanks.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations