Going Stellar

Home/Google Sheets reference

Google Sheets function · Date

TIME in Google Sheets: syntax and examples

TIME turns an hour, a minute and a second into a time value, stored as a fraction of a day. Use it to build times from separate cells or to add durations to a time.

Syntax

TIME(hour, minute, second)

Arguments

ArgumentTypeRequiredWhat it does
hournumberyesThe hour. Values above 23 wrap around, so 25 means 1 AM.
minutenumberyesThe minute. 90 becomes one hour and 30 minutes.
secondnumberyesThe second. Overflow carries into the minute in the same way.

Examples

The examples use this table, starting in A1:

HourMinuteSecond
14300
2500
0900
=TIME(A2, B2, C2)

Result: 2:30:00 PM

Builds a time from three cells. The display follows the locale: 12-hour with AM/PM in en_US, 24-hour in ro_RO.

Run in a Google Sheet (English US locale) on .

=TIME(A3, B3, C3)

Result: 1:00:00 AM

Hour 25 wraps to 1:00. TIME never returns a date part.

Run in a Google Sheet (English US locale) on .

=TIME(A4, B4, C4)

Result: 1:30:00 AM

90 minutes carry over into one hour and 30 minutes.

Run in a Google Sheet (English US locale) on .

=TIME(8, 45, 0) + TIME(0, 30, 0)

Result: 9:15:00 AM

Times are fractions of a day, so they can be added. 8:45 plus half an hour is 9:15.

Run in a Google Sheet (English US locale) on .

=HOUR(TIME(1.9, 0, 0))

Result: 1

Decimals are cut off, not rounded: 1.9 hours counts as hour 1.

Run in a Google Sheet (English US locale) on .

Common errors

  • Hours above 23 do not add days. TIME(25, 0, 0) is the same value as TIME(1, 0, 0), and TIME(24, 0, 0) equals midnight.
  • A negative hour, minute or second returns #NUM!. Subtract two times instead of passing a negative argument.
  • Text such as "abc" in any argument returns #VALUE!. Check imported cells that look like numbers but are stored as text.

Compared with Excel

Same syntax in Excel, and hours above 23 wrap around there as well.

Sources

  1. TIME (Docs Editors Help)

Markdown version · All functions