Using FORMAT for Input - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantage™ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

FORMAT can also be used for input.

For example, the following statement creates a table table_2 with two date type columns:

CREATE Table_2
  (f1 DATE FORMAT 'YY年MM月DD日',
   f2 DATE FORMAT '和暦YY年MM月DD日');

The following SQL statement is valid:

INSERT INTO Table_2 ('92年03月10日', '平成04年03月10日');

Each Imperial Era (except the current one) has an end, which is considered in the validation of input. Using Japanese Imperial Era formatting for dates previous to the Meiji era (before 1867/1/9) is considered a run-time error.

Normally on input, Teradata Database assigns default values for the year (current year), month (current month), and day (first day), if not specified.