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

How to write (CURRENT DATE - 1 YEAR) in teradata? - response (2) by CarlosAL

$
0
0
Hi. The solution provided is wrong (or at least not completely right). You should use ADD_MONTH() instead, because: SELECT DATE '2012-02-29' -  INTERVAL '1' YEAR;  *** Failure 2665 Invalid date.                 Statement# 1, Info =0  *** Total elapsed time was 1 second. but SELECT ADD_MONTHS(DATE '2012-02-29', - 12);  *** Query completed. One row found. One column returned.  *** Total elapsed time was 1 second. ADD_MONTHS(2012-02-29, -12) ---------------------------                  2011-02-28 HTH. Cheers. Carlos.

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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