w3resource

Excel TIME() function

TIME() function

This function is used to return the decimal number for a particular time. If, before the function was entered, the cell format was General the result is formatted as a date.

The decimal number returned by TIME is a value ranging from 0 (zero) to 0.99988426, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M.).

Version : Excel 2013

Syntax:

TIME(hour, minute, second)

Parameters:

Name Description Data Type Required/
Optional
Hour A number from 0 (zero) to 32767 representing the hour. Any value greater than 23 will be divided by 24 and the remainder will be treated as the hour value. For example, TIME(27,0,0) = TIME(3,0,0) = .125 or 3:00 AM. Number Required
Minute A number from 0 to 32767 representing the second. Any value greater than 59 will be converted to hours, minutes, and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 or 12:33:20 AM Number Required
Second A number from 0 to 32767 representing the second. Any value greater than 59 will be converted to hours, minutes, and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 or 12:33:20 AM Number Required

Remarks:-

Time values are a portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).

Example - 1:

The example below returns the decimal part of a day, for the time specified in row 2 (18 hours, 0, minutes, 0 seconds)

time1

This function is used to return the decimal number for a particular time. If, before the function was entered, the cell format was General the result is formatted as a date.

The decimal number returned by TIME is a value ranging from 0 (zero) to 0.99988426, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M.).

Version: Excel 2013

Syntax:

TIME(hour, minute, second)

Parameters

Name Description Data Type Required/
Optional
Hour A number from 0 (zero) to 32767 representing the hour. Any value greater than 23 will be divided by 24 and the remainder will be treated as the hour value. For example, TIME(27,0,0) = TIME(3,0,0) = .125 or 3:00 AM. Number Required
Minute A number from 0 to 32767 representing the second. Any value greater than 59 will be converted to hours, minutes, and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 or 12:33:20 AM Number Required
Second A number from 0 to 32767 representing the second. Any value greater than 59 will be converted to hours, minutes, and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 or 12:33:20 AM Number Required

Remarks:-

Time values are a portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).

Example - 1:

The example below returns the decimal part of a day, for the time specified in row 2 (18 hours, 0, minutes, 0 seconds)

time1

Example - 2:

The example below returns the decimal part of a day, for the time specified in row 4 (14 hours, 10, minutes, 15 seconds)

time2

Example - 3:

The example below returns the decimal part of a day, for the time specified in row 4 (14 hours, 10, minutes, 15 seconds)

time2

Previous: Excel SECOND() function
Next: Excel TIMEVALUE() function



Follow us on Facebook and Twitter for latest update.