MONTH Function [Date and Time]

Returns a number from 1 to 12 corresponding to the month of the given date.

Syntax

MONTHdate-expression )

Parameters

Parameters

Description

date-expression

A date/time value.

Returns

SMALLINT

Example

The following statement returns the value 7:

SELECT MONTH( '1998-07-13' ) FROM iq_dummy

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.