15.10 - SET SESSION DATEFORM - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Published
December 2015
Content Type
Programming Reference
Publication ID
B035-1144-151K
Language
English (United States)

Default dateform is being changed for the session.

ANSIDATE
A DATE format of CHARACTER(10) for the session, formatted as ‘YYYY-MM-DD’ for importing and exporting DATE values.
INTEGERDATE
Encoded integers for importing and exporting DATE values.
When the session DATEFORM is INTEGERDATE, the default DATE format in field mode is 'YY/MM/DD' for date columns created and date constants in character form.
You can use the tdlocaledef utility to change the 'YY/MM/DD' default DATE format. For details, see Utilities, B035-1102.

Example: Changing the Session Dateform From ANSIDATE to INTEGERDATE

You need to change the DATEFORM setting for the current session from ANSI session mode to Teradata session mode so you can run a legacy application that does not support ANSI dates. Use the following statement:

     SET SESSION DATEFORM = INTEGERDATE;

Example: Changing the Session Dateform from INTEGERDATE to ANSIDATE

To change the DATEFORM setting back to ANSIDATE, use the following statement:

     SET SESSION DATEFORM = ANSIDATE;