Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Feb 2003 @ 20:23:22 GMT


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


Subj:   Finding the last day of the month
 
From:   Hayes, Jim M

I have a need to find the last day of a month programatically (i.e. hardcoding Jan 31, etc. seems to me to be a kludge).

I have the month/year and can append 01 to generate the first day of the next month thusly:

ADD_MONTHS('2002-01-01',1)...... results in 2002-02-0 1.

Now, I want to subtract 1 day from that date and come up with 2002-01-31. How do I do that?

Jim Hayes,
Delta Airlines, Network Analysis



     
  <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