WEEKDAY


Returns the day of the week for a given date.

Syntax:

WEEKDAY(date, type)

returns the day of the week that date falls on, as a number.


The number returned depends on type, as follows:





day of the week

type=1

type=2

type=3

Sunday
1
7
6
Monday
2
1
0
Tuesday
3
2
1
Wednesday
4
3
2
Thursday
5
4
3
Friday
6
5
4
Saturday
7
6
5


If type is omitted, it is assumed to be 1.

Example:

WEEKDAY("2021-12-18", 1)

returns 7. 18 Dec 2021 falls on a Saturday.


Application:

Employee Shift Scheduling Analysis


Scenario: A retail store needs to analyze employee working hours and sales performance based on the day of the week. They want to identify peak days for staffing and understand if sales vary significantly on different days.


Problem: The store has a list of sales transactions and employee work shifts, but they need to easily determine which day of the week each transaction or shift occurred on.


Solution: Use the WEEKDAY function to extract the day of the week from the date column.


Table: Sales Transactions Data

Transaction ID

Date

Sales Amount

Weekday (Number)

A
B
C
D
1
1001
7/1/2025
$150.00
3
2
1002
7/2/2025
$210.00
4
3
1003
7/3/2025
$90.00
5
4
1004
7/4/2025
$300.00
6
5
1005
7/5/2025
$450.00
7
6
1006
7/6/2025
$520.00
1
7
1007
7/7/2025
$180.00
2
8
1008
7/8/2025
$280.00
3

Let's break down the results for each row:

  • For 2025-07-01 (Transaction ID 1001): The WEEKDAY function returns 3. This is because July 1, 2025, is a Tuesday.
  • For 2025-07-02 (Transaction ID 1002): The WEEKDAY function returns 4. This is because July 2, 2025, is a Wednesday.
  • For 2025-07-03 (Transaction ID 1003): The WEEKDAY function returns 5. This is because July 3, 2025, is a Thursday.
  • For 2025-07-04 (Transaction ID 1004): The WEEKDAY function returns 6. This is because July 4, 2025, is a Friday.
  • For 2025-07-05 (Transaction ID 1005): The WEEKDAY function returns 7. This is because July 5, 2025, is a Saturday.
  • For 2025-07-06 (Transaction ID 1006): The WEEKDAY function returns 1. This is because July 6, 2025, is a Sunday.
  • For 2025-07-07 (Transaction ID 1007): The WEEKDAY function returns 2. This is because July 7, 2025, is a Monday.
  • For 2025-07-08 (Transaction ID 1008): The WEEKDAY function returns 3. This is because July 8, 2025, is a Tuesday.




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