跳到主要內容

如何在Excel中將軍事時間轉換為標準時間?

也許您已經接受了包含軍工時間列表的工作表,如下所示,並且您習慣於查看標準時間,所以您想在Excel中將這些軍工時間轉換為標準時間,該怎麼辦?


箭頭藍色右氣泡 使用Excel中的公式將軍事時間轉換為標準時間

在Excel中,您可以使用公式快速將軍事時間轉換為標準時間。

1.選擇一個空白單元格以鍵入此公式 = TIMEVALUE(LEFT(A1,2)&“:”&MID(A1,3,2)&“:”&RIGHT(A1,2)) (A1表示要將軍事時間轉換為標準時間的單元格,可以根據需要進行更改),然後按 Enter 鍵,然後拖動填充手柄以填充所需的範圍。 看截圖:

2.然後選擇範圍B1:B6(使用上面公式的範圍,可以根據需要更改它),然後單擊鼠標右鍵單擊 單元格格式。 看截圖:

3。 在裡面 單元格格式 對話框中單擊 聯繫電話 選項卡,然後單擊 Time 來自 類別 框,然後從右側部分選擇標準時間格式。 看截圖:

4。 點擊 OK,您可以看到結果:

尖端:如果軍事時間只有小時和分鐘,例如2323,則可以使用此公式 = TIMEVALUE(LEFT(A1,2)&“:”&RIGHT(A1,2)) 然後按照上述步驟將其轉換為標準時間。 看截圖:


箭頭藍色右氣泡 使用Excel中的公式將標準時間轉換為軍事時間

要將標準時間轉換為軍事時間,您還可以使用公式來解決。

選擇一個空白單元格,然後鍵入此公式 = TEXT(A1,“ HHMMSS”) (A1表示要將軍事時間轉換為標準時間的單元格,可以根據需要進行更改),然後按 Enter,然後拖動填充手柄以填充所需的範圍。 看截圖:

尖端:如果標準時間只有小時和分鐘,例如11:23 PM,則可以使用此公式 = TEXT(A1,“ HHMM”)。 看截圖:

小費。如果要將非標準日期轉換為標準日期mm / dd / yyyy,請嘗試使用Kutools for Excel的 轉換為日期 如以下屏幕截圖所示。 它在30天內無限制地提供完整功能, 請下載並立即免費試用。

快速將非標準日期轉換為標準日期格式(mm / dd / yyyy)

在某些情況下,您可能會收到帶有多個非標準日期的工作清單,並將它們全部轉換為標準日期格式,如mm / dd / yyyy可能對您造成麻煩。 這裡 Excel的Kutools's 轉換至今 一鍵即可將這些非標準日期快速轉換為標準日期格式。  點擊即可獲得 30 天的免費全功能試用!
doc轉換日期
 
Kutools for Excel:擁有300多個便捷的Excel加載項,可以在30天內免費試用。

相關文章:

最佳辦公生產力工具

🤖 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 (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Had to recreate this.

I had a list of Military Hour Blocks in column E for my worksheet (Example: 0, 1, 2, ...10, 11, 12, 13, 14, ...)

This was the formula I had to use.
=IF(E:E >11,TIMEVALUE(CONCAT(RIGHT(E2-12,2)," ","PM")),TIMEVALUE(CONCAT((E2)," ","AM")))
This comment was minimized by the moderator on the site
The problem with this is you have to use two columns
This comment was minimized by the moderator on the site
Yes, but you can copy and pasted the formula result as value, then delete the original column and formula column if you do not need them any more, Now you will leave only one result column.
This comment was minimized by the moderator on the site
I think this solves my problem of miltary times that are less than 1000 not having the zero in front (e.g. 714 rather than 0714):

=IF(A1<1000,CONCAT(0,A1),A1)
This comment was minimized by the moderator on the site
Sorry for reply you too late.In my version, the formula can work for three digits number which do not need to be add the leading zero. If it cannot to work for you, you can add leading zero by format the cells as 0000 in the Format Cells > Custom.
This comment was minimized by the moderator on the site
What if the military time doesn't contain the zero in front? For example 0714 is showing as 714. How do you format these times quickly so that your formula above works correctly?
This comment was minimized by the moderator on the site
Thanks, it seemed to work great even though I am not that sharp with excel. I was able to find a pre-made excel spreadsheet that converts standard time to military time automatically for my needs at another site. You can find it here: http://www.militarytime.us/military-time-converter/ (the link is under the converter tool that is also quite nice for a quick single conversion). Thought others might find it useful as well.
This comment was minimized by the moderator on the site
This works well, but there's rounding errors after a few instances of this. How do you fix that? (I. E. I get down to where I'm adding 20 seconds to my start time, but the output time is 3 seconds later than it should be.)
This comment was minimized by the moderator on the site
Good instruction that worked well. Thank you, Chess
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations