Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Apr 2002 @ 17:50:33 GMT


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


Subj:   TimeStamp subtraction
 
From:   Anomy.Anom

Hy,

just another question...

I get an error when trying to subtract one timestamp field from another.

select cast('2002-01-01 00:00:15' as timestamp(0))
        - cast('2001-12-31 23:59:50' as timestamp(0));

=> 5407: Invalid operation on an ANSI Datetime or Interval value.
(...should result in >25< as the difference is 25 seconds)

I know that a timestamp originally is a character field but how else should I try to subtract? I also tried some variations of INTERVAL without success.


Thanks in advance and nice greetings from Vienna....

Guenter



     
  <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