HOUR


Returns the hour of a given time.

Syntax:

HOUR(time)

returns the hour of time as a number, 0 - 23. time may be text or a date-time serial number.

Example:

HOUR("2021-12-01 21:30:15")

returns 21.

HOUR(A1)

where cell A1 contains the time 9:25:10 as a date-time serial number, returns 9.


Application:

Analyzing Delivery Times for a Pizza Restaurant


Imagine "Pizza Palace," a bustling pizza delivery business. They want to analyze their delivery efficiency, specifically looking at how many orders are delivered within each hour of their operating day to identify peak times and potential bottlenecks.


Scenario: Pizza Palace records the exact time each order is delivered in their system. They want to generate a report showing the number of deliveries made during each hour of a specific day.


Table: Daily Deliveries

Order ID

Customer Name

Delivery Timestamp

Delivery Hour

A
B
C
D
1
1001
Olivia Chen
8/4/2025, 6:15 PM
18
2
1002
Noah Patel
8/4/2025, 7:05 PM
19
3
1003
Sophia Nguyen
8/4/2025, 6:45 PM
18
4
1004
Liam Miller
8/4/2025, 8:30 PM
20
5
1005
Isabella Garcia
8/4/2025, 7:55 PM
19
6
1006
Mason White
8/4/2025, 6:00 PM
18
7
1007
Ava Kim
8/4/2025, 9:10 PM
21
8
1008
Ethan Taylor
8/4/2025, 7:20 PM
19
9
1009
Mia Davis
8/4/2025, 8:00 PM
20
10
1010
Lucas Johnson
8/4/2025, 6:30 PM
18

When the HOUR function is applied to the Delivery Timestamp values, it performs the following:

  • For 2025-08-04 18:15:30, the HOUR function extracts 18. This means the delivery occurred between 18:00 (6:00 PM) and 18:59:59 (6:59:59 PM).
  • For 2025-08-04 19:05:10, the HOUR function extracts 19. This indicates the delivery happened between 19:00 (7:00 PM) and 19:59:59 (7:59:59 PM).
  • Similarly, for 2025-08-04 20:30:25, the HOUR function extracts 20, signifying a delivery between 20:00 (8:00 PM) and 20:59:59 (8:59:59 PM).
  • And for 2025-08-04 21:10:00, the HOUR function extracts 21, indicating a delivery between 21:00 (9:00 PM) and 21:59:59 (9:59:59 PM).




This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof