Macro Support for Dates - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
Product Category
Teradata Vantage™

Validation of date strings in a macro takes place when it is performed. The format of date strings validate against a DATE column format or the default DATE format, both of which can change after creating the macro.

To guarantee that dates are properly validated, create or replace your macros by doing either or both of the following:

  • Specify dates as ANSI date literals instead of strings.

    ANSI date literals are accepted as dates for any date operation.

  • Specify the date format you want in a FORMAT phrase in the macro.