Archives of the TeradataForum
Message Posted: Tue, 06 May 2008 @ 16:44:01 GMT
Subj: | | Re: Change in casting to Interval |
|
From: | | Dieter Noeth |
Anomy.Anom wrote:
| I�m trying to find some documentation as to why casting the date difference as an interval year(4) no longer works as it had
previously. | |
| I think that we had recently changed to VERSION 06.02.02.26 RELEASE V2R.06.02.02.25. | |
| This used to return 7 and after the change it returns 8. | |
> Select ((1080505(date)) - (1000704(date))) year(4);
| This was really useful to determining the age in years, it�s not anymore. | |
It's a feature, not a bug ;-)
It was introduced in 6.2 (based on DR 96278) and changed almost any result based on interval calculation. There was a Tech Alert on it,
too.
In your case it's the same as
extract(year from first_date) - extract(year from second_date)
Dieter
|