Archives of the TeradataForum
Message Posted: Thu, 06 Oct 2000 @ 00:47:12 GMT
There is no function that I know of to get the last day. However, the following mathematics on a date column will do it for you.
/* the division eliminates the day portion of the date. The multiplication makes it 00 in the day portion and the addition makes it the first day. Then it is CAST back to a date. The subtraction of 1 takes it to the last day of the previous month */
I am using a literal date and you would use a column. Give it a try and let me know if you have any questions.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|