Examples: LAST_DAY Function - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Example: Querying for DATE for the Last Day of the Month

The following query:

SELECT LAST_DAY(DATE '2009-12-20'); 

returns the result 2009/12/31.

Example: Querying for TIMESTAMP for the Last Day of the Month

The following query:

SELECT LAST_DAY(TIMESTAMP '2009-08-25 10:14:59'); 

returns the result 2009/08/31.

Example: Querying for TIMESTAMP WITH TIME ZONE for the Last Day of the Month

The following query:

SELECT LAST_DAY(TIMESTAMP '2009-06-15 10:14:59-8:00');

returns the result 2009/06/30.