Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 06 Oct 2000 @ 01:09:33 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: Functions of dates!
From:   Michael Larkins

Hi Maria:

There is no function that I know of to get the last day. A technique that I have used is this:

     /*  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.


  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023