How to Use HOUR, MINUTE, and SECOND Functions in Excel (Video in Khmer)
Learn how to extract hour, minute, and second from any time in Excel step-by-step with simple examples.
Hello everyone! Today I show you very easy step-by-step how to use HOUR(), MINUTE(), and SECOND() functions in Microsoft Excel.
If you have time values like 14:45:30 (or 2:45:30 PM) in your spreadsheet and you want to extract only the hour number, minute number, or second number into separate columns, these 3 formulas help you very fast!
📚 Related Tutorial: Learn more foundational formulas in our guide on Top 15 Basic Excel Formulas for Beginners ↗!
📊 Quick Comparison: HOUR vs MINUTE vs SECOND
| Function | What It Extracts | Result Example | Best Used For |
|---|---|---|---|
HOUR | Hour number (0 to 23) | 14 (for 2:00 PM) | Shift work hours or overtime calculation |
MINUTE | Minute number (0 to 59) | 45 | Minutes tracking or duration breakdown |
SECOND | Second number (0 to 59) | 30 | Precise time logs |
🛠️ 1. How to Use HOUR Function in Excel
The HOUR function extracts the hour part from a time cell (returns a number from 0 for 12:00 AM to 23 for 11:00 PM in 24-hour format).
Formula Syntax:
=HOUR(serial_number)
Simple Example:
If cell A2 contains time 2:45:30 PM (or 14:45:30):
=HOUR(A2)
- Result:
14
🛠️ 2. How to Use MINUTE Function in Excel
The MINUTE function extracts the minute part from a time cell (returns a number from 0 to 59).
Formula Syntax:
=MINUTE(serial_number)
Simple Example:
If cell A2 contains time 2:45:30 PM:
=MINUTE(A2)
- Result:
45
🛠️ 3. How to Use SECOND Function in Excel
The SECOND function extracts the second part from a time cell (returns a number from 0 to 59).
Formula Syntax:
=SECOND(serial_number)
Simple Example:
If cell A2 contains time 2:45:30 PM:
=SECOND(A2)
- Result:
30
💡 Combine Hour, Minute, and Second Together (TIME Function)
If you have separate columns for Hour (A2), Minute (B2), and Second (C2), you can combine them back into a real Excel time value using =TIME():
=TIME(hour, minute, second)
=TIME(A2, B2, C2)
- Result:
2:45:30 PM
💡 Pro Tips for Time Functions
- Extract Current Time Component: Want to get current hour right now? Combine with
NOW()function:=HOUR(NOW()). - 24-Hour Military Format: Remember that
HOUR()always returns 24-hour format (e.g.,1PM returns13,8PM returns20). - Format Cell as General or Number: If Excel shows your result as
12:00:00 AMafter typing=HOUR(A2), change cell format from Time to General or Number!