Archives of the TeradataForum
Message Posted: Thu, 06 Oct 2000 @ 01:09:33 GMT
There is no function that I know of to get the last day. A technique that I have used is this:
(((date+31)/100*100+1)(date))-1 /* The addition of 31 takes any date into the next month. The division by 100 removes the day portion of the date. The multiplication by 100 puts back 00 in the day portion. The addition of 1 makes it the first day of the month when it is converted back into a date. The subtraction of 1 makes it that last day of the previous month */ /* If you wanted the last day of the current month, eliminate the addition of 31 */
Hope this helps.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|