Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Feb 2003 @ 20:34:28 GMT


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


Subj:   Re: Finding the last day of the month
 
From:   Arunachalam, Sankar

To find First day of the month from year, month use query

select ('200201' (date, format 'yyyymm'))

'200201'
---------
2002-01-01

To find the last day use:

select Add_months(('200201' (date, format 'yyyymm')),1)-1

(ADD_MONTHS('200201', 1)-1)
---------------------------
2002-01-31

Sankar



     
  <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