Quantcast
Channel: Teradata Downloads - Tools
Viewing all articles
Browse latest Browse all 870

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

$
0
0

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

Forums: 

Viewing all articles
Browse latest Browse all 870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>