Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

LAST_DAY function (extension)

Syntax

LAST_DAY ( date_expression )

Description

The scalar function LAST_DAY returns the date corresponding to the last day of the month containing the argument date.

Example

SELECT *

FROM orders

WHERE LAST_DAY (order_date) + 1 = '08/01/1991' ;

Notes

  • The argument to the function must be of type DATE.
  • The result is of type DATE.
  • If the argument expression evaluates to null, the result is null.

TOCIndex