|
|
Archives of the TeradataForum
Message Posted: Wed, 03 May 2006 @ 13:54:46 GMT
Subj: | | Re: Subtracting month from a date |
|
From: | | Victor Sokovin |
| We discovered a problem that I thought others might be interested in. | |
| The problem can occur when using INTERVAL to subtract a month from > a date where the previous month has fewer days than the current
> month. If the current date is 2006-05-31 and then using INTERVAL > to subtract 1 month from the current date results in an illegal >
date: 2006-04-31 (April has only 30 days). | |
Thanks for the warning but this is not something new. Oracle would do exactly the same in this case. It's probably what ANSI specifications
prescribe. Obviously, opinions can differ on this but at least we have some consistency across vendors.
Regards,
Victor
| |