Excel offers you a variety of functions for calculations across different areas: Date and time functions in Excel or trigonometric and mathematical functions in Excel, ... In the article below, we will explore time functions in Excel.
Time Functions in Excel
1. HOUR Function
- Syntax: HOUR(Serial-number)
- Where: Serial number is a mandatory parameter, representing the time you want to convert to hours. It can be in text form, decimal number, or in the form of other functions.
- Purpose: Returns the hour of a time value. The returned hour is an integer ranging from 0 to 23.
2. MINUTE Function
- Syntax: MINUTE(serial-number)
- Where: Serial-number: Mandatory. The value you want to convert to minutes.
- Purpose: Converts a time value to minutes in the hour-minute-second expression. The minute is returned as an integer in the range from 0 to 59.
Example: For the spreadsheet below. The requirement is to separate minutes into a separate column.
- Enter the formula at cell C6= MINUTE(B6) and the result of minutes is now separated.
- Copy the formula down to other cells to get the results.
3. Second Function
- Syntax: SECOND(serial-number)
- Where: Serial number is the value you want to convert to seconds and is a mandatory value.
- Function: Returns the seconds of the given time value. Seconds are returned as an integer ranging from 0 to 59.
4. TIME Function
- Syntax: TIME(hour, minute, second)
- Where:
+ Hour: value representing hours, a number from 0 to 32767. Mandatory parameter.
+ Minute: value representing minutes, a number from 0 to 32767. Mandatory parameter.
+ Second: value representing seconds, a number from 0 to 32767. Mandatory parameter.
- Function: Returns a decimal number within a specific time value. The decimal number returned ranges from 0 to 0.99999999, corresponding to the time from 0:00:00 to 23:59:59.
- Syntax: TIMEVALUE(time_text)
- Where: Time_text: String representing the entered time value. This value is mandatory.
- Function: Returns the decimal value of the entered time. The decimal number is within the range from 0 to 0.99988426, representing time intervals from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 PM).
- Chức năng: Trả về giá trị thập phân của thời gian được nhập vào. Số thập phân là nằm trong khoảng từ 0 đến 0,99988426, thể hiện các khoảng thời gian từ 0:00:00 (12:00:00 SA) đến 23:59:59 (11:59:59 CH).
- Syntax: NOW()
- Function: Returns the current date and time of the system
- Example:
Ví dụ:
- It is now 10:30 AM on August 14, 2014. Writing the formula =NOW() in cell B6 will return the accurate date and time.
- It is now 10:32 AM on August 14, 2014. Writing the formula = NOW() – 1 in cell B7 will return the date and time with one day subtracted.
Here, we have compiled for you the time functions in Excel. You can use these functions based on specific cases to solve your problems.
When using Excel, you will encounter many advanced functions such as VLOOKUP or DGET. These are advanced functions in Excel, often appearing in complex problem-solving and large-scale tasks that require proficient use of these advanced Excel functions.
In contrast to advanced functions in Excel, basic functions in Excel include the most common operations such as MAX, MIN, COUNT, and more. These can be considered the simplest operations in Excel. If you want to explore more basic functions in Excel, feel free to visit Mytour and engage in discussions with us.
