Archives of the TeradataForum
Message Posted: Wed, 05 Mar 2002 @ 21:22:55 GMT
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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|