Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

DAYOFMONTH function (ODBC compatible)

Syntax

DAYOFMONTH ( date_expression )

Description

The scalar function DAYOFMONTH returns the day of the month in the argument as a short integer value in the range of 1 - 31.

Example

SELECT *

FROM orders

WHERE DAYOFMONTH (order_date) = 14 ;

Notes

  • The argument to the function must be of type DATE.
  • The argument must be specified in the format MM/DD/YYYY.
  • The result is of type SHORT.
  • If the argument expression evaluates to null, the result is null.

TOCIndex