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

Day

Example

Retrieve the day of the month from the specified date.

SELECT Day(#05/17/2017#);

Definition and Usage

The DAY() function returns the day of the month for a given date as an integer between 1 and 31.

Syntax

Day(date)

Parameter Values

Parameter

Description

date

Mandatory. A numeric or string expression that represents a valid date.

Technical Details

WORKS IN

From Access 2000

More Examples

Example

Retrieve the day of the month for the current date.

SELECT Day(Date());

Example

Retrieve the day of the month from the “BirthDay” column in the “Employees” table.

SELECT Day(BirthDate) FROM Employees;