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

Month

Example

Retrieve the month component from a specified date.

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

Definition and Usage

The Month() function retrieves the month component from a given date, returning an integer between 1 and 12.

Syntax

Month(date)

Parameter Values

Parameter

Description

date

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

Technical Details

WORKS IN

From Access 2000

More Examples

Example

Retrieve the month component of today’s date.

SELECT Month(Date());

Example

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

SELECT Month(BirthDate) FROM Employees;