跳到主要內容

如何在Excel中輕鬆輸入日期而不用斜線?

通常,當我們輸入標準日期時,我們需要輸入斜杠以將它們分開,例如 MM / DD / YYYY。 但是在某些情況下,您可能希望直接輸入日期作為序列號,例如01022016,然後可以將日期轉換為格式為1/2/2016的標準日期,如下圖所示。 在本文的此處,我將介紹在Excel中輕鬆輸入標準日期而不用斜杠的技巧。


箭頭藍色右氣泡 使用文本到列輸入不帶斜杠的日期

在Excel中,您可以應用“文本到列”功能將8位數字的序列號快速轉換為標準日期。

1.選擇8位數字,然後單擊 數據 > 文本到列。 看截圖:
doc輸入日期,不帶斜線2

2。 在裡面 將文本轉換為列嚮導的步驟1,檢查 固定寬度 選項,請參見屏幕截圖:
doc輸入日期,不帶斜線3

3。 點擊 下一頁 > 下一頁嚮導的第3步,並檢查 日期 選項 列數據格式 部分,然後選擇 MDY 從下一個下拉列表中,並指定一個單元格作為目標。 看截圖:
doc輸入日期,不帶斜線4

4。 點擊 。 現在,序列號已轉換為標準日期。
doc輸入日期,不帶斜線5

尖端:為了正確地轉換為日期,可以先將數字轉換為文本。


箭頭藍色右氣泡 使用“格式化單元格”功能輸入不帶斜線的日期

另外,您可以應用“單元格格式”功能將序列號轉換為標準日期格式。

1.選擇要右鍵單擊的數字,然後選擇 單元格格式 從上下文菜單中。 看截圖:
doc輸入日期,不帶斜線6

2.然後在 單元格格式 對話框下 聯繫電話 標籤,點擊 習俗 來自 類別 窗格,然後轉到“類型”文本框輸入 ##“ /” ##“ /” #### 在右側部分。 看截圖:
doc輸入日期,不帶斜線7

3。 點擊 OK。 所選數字已轉換為標準日期。
doc輸入日期,不帶斜線11


箭頭藍色右氣泡 用公式輸入不帶斜線的日期

iMoreover,您可以應用公式將數字轉換為日期格式。

選擇要使用的數字旁邊的空白單元格,輸入此公式 =DATE(RIGHT(A9,4),LEFT(A9,IF(LEN(A9) = 8,2,1)),LEFT(RIGHT(A9,6),2)),A9是要轉換的數字,將自動填充手柄拖到要應用此公式的單元格上方,請參見屏幕截圖:
doc輸入日期,不帶斜線9


箭頭藍色右氣泡 使用Kutools for Excel輸入不帶斜線的日期

如果你有 Excel的Kutools,您可以應用它 轉換為日期 實用程序,可將多個非標準日期快速轉換為標準日期。

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

免費安裝 Kutools for Excel,請執行以下操作:

選擇要轉換為日期的數字,然後單擊 庫工具 > 內容 > 轉換為日期。 看截圖:
doc kutools轉換為日期1
doc kutools轉換為日期2

最佳辦公生產力工具

🤖 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)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
excelentes opciones , pero en mi caso yo necesito que las personas involucradas en la captura siempre pongan el formato de fecha correcto les doy un ejemplo de como lo hacen, 080923, 08.09.23, y de esta forma la formula no los reconoce para hacer el calculo de la edad, y he estado buscando como hacer para que mis compañeros capturen bien la fecha, ya sea poniendo un tipo de formato preestablecido donde los obligue a capturar correctamente la fecha o algo con la validacion de datos.

espero me puedan ayudar, de antemano muchas gracias.
This comment was minimized by the moderator on the site
Thank you so much! That was very helpful. I used your 0#"/"##"/"#### to enter dates without slashes and display the 0 in front. Some of the images need to be enlarged to show the ". It was hard to tell if that was an " or an *.
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
比如我在輸入0329就會是本年的3月29日,而不是2029年的3月1 日呢?請問應該如何設定呢?謝謝你。
This comment was minimized by the moderator on the site
Hi, you can use this formula:
=DATE(TEXT(TODAY(),"yyyy"),LEFT(A2,2),RIGHT(A2,2))

A2 is the cell contains the string you want to convert to date.
This comment was minimized by the moderator on the site
How do I format this for the whole column so any new data that is inputted it will automatically convert it to dd/mm/yyyy? the above explains if you already have data in can this be done for any additional data you would like to add?
This comment was minimized by the moderator on the site
Hi, Faatimah, if you want the datat input in the future will be automatically converted to dd/mm/yyyy, firstly, you need to type one data in the column, such as 05062022 in A1, and then select the whole column A, and press Ctrl + 1 to display the Format Cells dialog, type ##"/"##"/"#### into the Custom secitoon textbox and click OK. Now the data entered in column A will be auto converted to dd/mm/yyyy.
This comment was minimized by the moderator on the site
How do I get a leading zero for 1-9 using ##"/"##"/"####?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations