|
|
Archives of the TeradataForum
Message Posted: Thu, 12 Apr 2013 @ 01:36:26 GMT
Subj: | | Re: Time addition issue |
|
From: | | frank.c.martinez |
Hmm, I don't quite get how adding two dates together makes any sense. Subtracting a date from another, that might make sense. In the old
days, before ANSI interval logic, you could (and still can) add numbers to dates to get other dates. This turns out to be very useful for
calculating dates, for example:
SELECT DATE - EXTRACT(DAYS FROM DATE) + 1
Which is a very quick way of finding the first of the month (or if you leave off the +1, then the last day of the month before this one). But
I think if you're going to do something like your trying to do ("You keep using that word. I do not think it means what you think it means."),
you're going to have to learn ANSI Interval syntax. I have to relearn it every time I use it. There is a very good paper in the attachments
section of this very same listserv that might help.
iv
| |