Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Mar 2008 @ 16:31:49 GMT


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


Subj:   Re: Please give some idea about calendar operations
 
From:   Michael Larkins

Hello Ravi:

I am not entirely sure what you mean by "last six months" but here are two possible ways to approach it in your :

1. March 23 going back to September 23 - WHERE activity_date >= add_months(activity_date,-6)

2. March 23 going back to September 1 - WHERE activity_date >= (add_months(activity_date,-6)/100)*100+1(date)


I hope this answers your question.

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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