Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 31 Oct 2006 @ 12:59:43 GMT


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


Subj:   Re: Calculating Months between two dates
 
From:   Michael Larkins

prahlad:

Dates can be a little different than what we are normally use to when dealing with anything except days between. I have written how to do these types using intervals and date math. Here is a way to get what you are asking for:

     /*  good up to 99 months, else use up to month(4) for number of
     digits=9999 months)  */
         sel start_date sdt, end_date edt, (edt-sdt) month

Hope this helps,

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: 15 Jun 2023