Excel can also perform calculations with time.

Important Functions

Function

Purpose

TIME

Creates a time

HOUR

Extracts hour

MINUTE

Extracts minutes

SECOND

Extracts seconds

TIME

Syntax

=TIME(hour,minute,second)

Example:

=TIME(14,30,0)

Result:

2:30 PM

HOUR

=HOUR(A2)

Extracts the hour.

MINUTE

=MINUTE(A2)

Extracts minutes.

SECOND

=SECOND(A2)

Extracts seconds.

Example — Employee Working Hours

Employee

Login

Logout

Working Hours

Amit

09:15 AM

06:00 PM

 

Neha

09:30 AM

05:45 PM

 

Rahul

10:00 AM

07:00 PM

 

Formula:

=C2-B2

Format the result as:

[h]:mm

Practice

Create an Employee Working Hours Calculator.