DAY Function [Date and Time]

Returns an integer from 1 to 31 corresponding to the day of the month of the date specified.

Syntax

DAYdate-expression )

Parameters

Parameters

Parameter

Description

date-expression

The date.

Returns

SMALLINT

Example

The following statement returns the value 12:

SELECT DAY( '2001-09-12' ) FROM iq_dummy

Standards and Compatibility

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

  • Sybase—Compatible with Adaptive Server Enterprise.