Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Fri, 06 Oct 2000 @ 09:09:41 GMT





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




Subj:   Re: Functions of dates!
 
From:   Richard Perry



Maria,

I have always found the following SQL very useful for calculating the first and last day of the previous month.

select
((((add_months(date,-1)/100)*100)+1) (date)),
(((date/100)*100)+1 (date)) -1


Hope it helps.





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008