Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

casting 6 digit integer to date - response (2) by dnoeth

$
0
0
It run successful before year 2013 :-) select 201212 (date); *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. 201212 ---------- 1920-12-12You need to adjust the integer to the internal format, (year - 1900) * 10000 + month * 100 + day: SELECT (201301 * 100) + 1 - 19000000 (DATE); *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. (((201301*100)+1)-19000000) --------------------------- 2013-01-01Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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