TIME

Returns the serial number of a particular time. The serial number returned by TIME is a decimal fraction ranging from 0 to 0.99999999, representing the times from 0:00:00 (12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.).

Syntax

TIME(hour,minute,second)

Hour   is a number from 0 (zero) to 23 representing the hour.

Minute   is a number from 0 to 59 representing the minute.

Second   is a number from 0 to 59 representing the second.

Remarks

Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different date systems as their default. For more information about date systems and serial numbers, see NOW.

Examples

TIME(12, 0, 0) equals the serial number 0.5, which is equivalent to 12:00:00 P.M.

TIME(16, 48, 10) equals the serial number 0.700115741, which is equivalent to 4:48:10 P.M.

TEXT(TIME(23, 18, 14), "h:mm:ss AM/PM") equals "11:18:14 PM"