Date formatting error when porting SQL from TD 13 to TD 15

Tools
Teradata Employee

Date formatting error when porting SQL from TD 13 to TD 15

Hi

We are migrating from TD 13 to TD 15.

Following is the SQL that we need to run:

SELECT CAST( '15/11/03 00:00:00' AS TIMESTAMP(0) FORMAT 'YY/MM/DDbhh:mi:ss')

Output on TD15:

11/3/1915 00:00:00

Output on TD13 which is the correct date that is required:

11/3/2015 00:00:00

One way to fix this is to write the script with the complete year:

SELECT CAST( '2015/11/03 00:00:00' AS TIMESTAMP(0) FORMAT 'YY/MM/DDbhh:mi:ss')

The problem is that this script is being used in a lot of places and it is going to be a problem tracing all the places and replacing the dates.

Any help on how to fix this?

Thanks

Wasim

Tags (1)
1 REPLY
Teradata Employee

Re: Date formatting error when porting SQL from TD 13 to TD 15

Hi,

The issue is with dbscontrol parameter Centurybreak

By default it is set to 0 and need to be change into 80

Streps:

login as root to the Teradata system PDN node

#display -enter

check Centurybreak=0 in General filed 14

to change it

modify general 14=80 enter

wr

to save to GDO

You may change in the ODBC connectivity to UTF 16

Good luck