CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Microsoft Excel – TIME functions

TIME function in Excel and its related functions are important functions to deal with date-time-related data. As these functions are commonly used with DATE functions, recommended reading an article on DATE functions.

TIME function in Excel

It returns the time value by taking individual time components (hour, minutes & seconds) as its arguments. Using this function we can form the time code using these individual time components.

Syntax:

TIME(hour, minute, second)

TIME function in Excel is very useful when converting unidentified time format to the Excel-recognized time format. We need to first split the unidentified time format into individual time components and then combine the components to form a proper time format using this function.

FormulaResult
TIME(20, 20, 20)8:20 PM
TIME(0, 20, 0)12:20 AM

HOUR function

It takes the time value as an argument and returns the hour (ranging from 0 to 23) component of a time value.

Syntax:

HOUR(time value as serial number)

FormulaResult
HOUR(NOW())20
HOUR(TIMEVALUE(“25-04-2019 20:54”))20

MINUTE function

When passing the time value through this function, it returns the minutes (ranging from 0 to 59) value of it.

Syntax:

MINUTE(time value as serial number)

FormulaResult
MINUTE(NOW())54
MINUTE(TIMEVALUE(“25-04-2019 20:54”))54

SECOND function

A seconds value (ranging from 0 to 59) will be returned by this function when we pass the time value as an argument.

Syntax:

SECOND(time value as serial number)

FormulaResult
SECOND(NOW())27
SECOND(TIMEVALUE(“25-04-2019 20:54:27”))27

TIMEVALUE function

When we have the time value in text format, we can convert that into a time value using this function. So that, we can use the converted value in formulas for any time-related calculations.

Syntax:

TIMEVALUE(time value as text)

FormulaResult
TIMEVALUE(“20:20”)0.847222222
TIMEVALUE(“25-04-2019 20:54:27”)0.871145833

🙂 Sahida

Microsoft Excel – TIME functions

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top