Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Mar 2002 @ 21:22:55 GMT


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


Subj:   Re: Days between
 
From:   Glenn D. McCall

Typically you just subtract the two dates. Here is an example;

create table d1 (d1 date, d2 date); insert into d1 (d1, d2) values ('20020101' (DATE, format 'yyyymmdd'), date) select d1,d2, d2 - d1 from d1;

Depending on when you run this, you will get a different result. I ran it today (2002/03/06) and got 64 for the third column - which is about right, 6 Mar 2002 is the 64th day of the year.


Hope this works for you.

Glenn Mc



     
  <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