Archives of the TeradataForum
Message Posted: Thu, 27 Feb 2003 @ 20:23:22 GMT
I have a need to find the last day of a month programatically (i.e. hardcoding Jan 31, etc. seems to me to be a kludge).
I have the month/year and can append 01 to generate the first day of the next month thusly:
ADD_MONTHS('2002-01-01',1)...... results in 2002-02-0 1.
Now, I want to subtract 1 day from that date and come up with 2002-01-31. How do I do that?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|