Example: Finding Employee Birthdates - 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

Consider a table named employee that was created with a session dateform mode of INTEGERDATE where dob is a DATE column with a format of M3BDDBY4. To list employees who were born between January 30, 1938, and March 30, 1943, you can specify the date information as follows:

SELECT name, dob 
FROM employee 
WHERE dob BETWEEN 'Jan 30 1938' AND 'Mar 30 1943' 
ORDER BY dob;

The result returns the date of birth information as specified for the Employee table:

Name                  DOB
----------    -----------
Inglis C      Mar 07 1938
Peterson J    Mar 27 1942

To change the date format to an alternate form, change the SELECT to:

SELECT name, dob (FORMAT 'yy-mm-dd') 
FROM employee 
WHERE dob BETWEEN 'Jan 30 1938' AND 'Mar 30 1943'
ORDER BY dob ;

The format specification changes the display to the following:

Name               DOB
----------    --------
Inglis C      38-03-07
Peterson J    42-03-27