NUMERIC to DATE conversion in Teradata

Although not recommended, you can convert numbers to dates.

Examples:
Raw value -----> Converted as
901201 -----> 1990-12-01
1001201 -----> 2000-12-01
19901201 -----> 3890-12-01

The following example treats DATE as a numeric format. This example is included only for the sake of completeness.
you should not define date data as a numeric type. Instead, use the ANSI Date type.


Specifying yy-mm-dd format:

SELECT name, dob (FORMAT ’yy-mm-dd’) FROM employee
WHERE dob BETWEEN ‘May 30 2012'
AND ’Aug 30 2012’
ORDER BY dob


Specifying in INT format:

SELECT name, dob(INTEGER)
FROM employee
WHERE dob BETWEEN 380307 AND 420825
ORDER BY dob ;
or
SELECT name, CAST (dob AS INTEGER)
FROM employee
WHERE dob BETWEEN 380307 AND 420825
ORDER BY dob ;


..