Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 06 Oct 2000 @ 00:47:12 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. 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.


  <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: 28 Jun 2020