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.

(((991025(date))/100*100+1)(date))-1

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

Mike



     
  <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: 27 Dec 2016