16.10 - Using FORMAT for Input - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-1143-161K

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.