TIME()

Syntax. TIME(hour,minute,second)

Description. This function returns the serial number for a time indicated by the arguments hour, minute, and second.

Arguments

  • hour (required). A number from 0 through 32,767 indicating the hour. Each value greater than 23 is divided by 24, and the remainder is the hour value. For example, TIME(28,0,0) corresponds to TIME(4,0,0), which is 4:00 or 4/24 or 0.16667.

  • minute (required). A number from 0 through 32,767 indicating the minute. Each value greater than 59 is divided by 24*60 and converted into hours and minutes. For example, TIME(0,150,0) corresponds to TIME(2,30,0), which is 2:30 or 0.1041667.

  • second (required). A number from 0 through 32,767 indicating the second. Each value greater than 59 is divided by 24*60*60 and converted into hours, minutes, and seconds. For example, TIME(0,0,12011) corresponds to TIME(3,20,11), which is 3:20:11 or 0.139016204.

Background. When calculating times, you sometimes have to deconstruct a time to add minutes. However, the result has to be returned as a normal time. The TIME() function converts the parts of a time back into a (numeric) time expression that you can use in other date calculations. The TIME() function is ideal for formulas.

The function returns a decimal number in the range of 0 through 0.99999999 and corresponds to a time from 00:00:00 through 23:59:59. If you select the General option for the cell format before entering the function, the result is formatted as time.

Examples. For applications that include standard processing times in hours, minutes, and seconds, you might want to combine these to display a time value. To do this, use the formula

=TIME(standard_hours,standard_minutes,standard_seconds)

The following examples show possible results and exceptions if the 24-hour, 60-minute, or 60-second boundary is exceeded:

  • =TIME(5,6,11) returns 05:06:11.

  • =TIME(13,10,0) returns 13:10:00.

  • =TIME(23,45,30) returns 23:45:30.

  • =TIME(24,15,30) returns 00:15:30.

  • =TIME(26,30,30) returns 02:30:30.

  • =TIME(12,80,10) returns 13:20:10.

  • =TIME(12,59,120) returns 13:01:00.

See Also

DATE(), DAY(), HOUR(), MINUTE(), MONTH(), SECOND(), TIMEVALUE(), YEAR()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.223.10