Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Sep 2011 @ 09:07:01 GMT


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


Subj:   Mdiff on Date field
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, September 14, 2011 04:43 -->

HI All,

I am trying to use mdiff on date field. It is working however when the month/year changes, the mdiff values are wrongly interpreted. I guess this is due to the fact that TD stores date as integerdate. Can someone help me on to get the correct difference b/w two consecutive rows irrespective of month/year?

     ID    date       Mdiff     Ideal value should be
      1    28-Jan     null      null
      1    31-Jan        3         3
      1    1-Feb        71         1


     
  <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