Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

WeekdayName

Example

Retrieve the name of the weekday corresponding to a numeric value.

SELECT WeekdayName(3);

Definition and Usage

 The WeekdayName() function retrieves the weekday name based on a numeric value.

Syntax

WeekdayName(numberabbreviatefirstdayofweek)

Parameter Values

Parameter

Description

number

Required. A numeric value ranging from 1 to 7, representing the day of the week.

abbreviate

Optional. A Boolean parameter where:

  • True indicates the weekday name should be abbreviated.
  • False (default) indicates the weekday name should not be abbreviated.

firstdayofweek

Optional. Specifies the starting day of the week with the following options:

  • 0: Use the NLS API setting
  • 1: Sunday (default)
  • 2: Monday
  • 3: Tuesday
  • 4: Wednesday
  • 5: Thursday
  • 6: Friday
  • 7: Saturday

Technical Details

WORKS IN

From Access 2000

More Examples

Example

Retrieve the abbreviated weekday name corresponding to a numeric value.

SELECT WeekdayName(3, true);

Example

Retrieve the abbreviated weekday name based on a numeric value, using Monday as the first day of the week.

SELECT WeekdayName(3, true, 2);