When loading a DB2 timestamp into a Teradata table, BO considers this Teradata Timestamp as a character field. I have tried to convert a Timestamp into a truly date field so that I can do ‘days between’ calculations, but have had no luck. Any suggestions?
I’m not really familiar with the format of a DB2 Timestamp, but I think you will have to do the math in Teradata. The following is from a whitepaper by Geoffrey Rommel on the teradata forum:
sel cast(ts01 as date) - cast(ts04 as date)
from dttest;
(ts01-ts04)
-----------
226 -- type of this result is INTEGER
sel ts01 - ts04 day(4)
from dttest;
(ts01 - ts04) DAY
-----------------
226 -- type of this result is INTERVAL DAY
You can also use cast to store the timestamp in another column as a true date field, and do additional math in BO.