To use this function, choose Calc > Calculator.

Extracts the time portion of a date/time value. For example, the time portion of "1/6/16 10:23" is "10:23". This function is useful in macros and formulas.

Syntax

TIME(number_or_text)

For number_or_text, enter a text string in a default date/time format such as "3/6/16 10:23", a column containing such values, or a numeric representation of a date/time value.

If you store the result in a column, the output is in date/time format. If you store the result in a constant, the output is the numeric representation of the date/time value.

Example

Calculator expression Result
TIME("5/11/14 12:55:35 PM") 12:55:35 PM
TIME(0.471543) 11:19:01 AM

For example, the manager of a medical office want to analyze the patient wait times. Current data in column C2 includes the date and time of each patient's arrival, but the manager is interested only in the time portion. The manager enters the expression TIME(C2) and stores the results in C3.

C2-D C3-D
Arrival time TIME value
1/12/2006 8:15 AM 8:15:00 AM
1/24/2006 10:35 AM 10:35:00 AM
1/13/2006 2:16 PM 2:16:00 PM
1/10/2006 3:10 PM 3:10:00 PM
1/14/2006 9:31 AM 9:31:00 AM
1/4/2006 4:42 AM 4:42:00 AM
1/10/2006 2:11 PM 2:11:00 PM
1/24/2006 3:15 PM 3:15:00 PM
1/23/2006 7:45 AM 7:45:00 AM
1/12/2006 1:17 PM 1:17:00 PM

Next, the manager wants to identify appointments scheduled after 1:00 PM. The manager enters the expression TIME(C2)>= TIME("1:00:00 PM") and stores the results in C4. Minitab returns a 1 for values greater than or equal to value entered and a 0 for values less than the value entered.

C2-D C3-D C4
Arrival time TIME value After 1?
1/12/2006 8:15 AM 8:15:00 AM 0
1/24/2006 10:35 AM 10:35:00 AM 0
1/13/2006 2:16 PM 2:16:00 PM 1
1/10/2006 3:10 PM 3:10:00 PM 1
1/14/2006 9:31 AM 9:31:00 AM 0
1/4/2006 4:42 AM 4:42:00 AM 0
1/10/2006 2:11 PM 2:11:00 PM 1
1/24/2006 3:15 PM 3:15:00 PM 1
1/23/2006 7:45 AM 7:45:00 AM 0
1/12/2006 1:17 PM 1:17:00 PM 1
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy