Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 30 Jun 2006 @ 09:04:51 GMT


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


Subj:   Re: TIMESTAMP with TIMEZONE
 
From:   Dieter Noeth

Anomy.Anom wrote:

  We have loaded a transaction table with a column defined with a TIMESTAMP data type with GMT data and a location_id. Now we need to display each time in the location_id's local time. I don't see how that would be possible in the current set up, even if I know each location_id's time zone, due to daylight savings. I believe the column would have to be TIMESTAMP WITH TIMEZONE to have this functionality. That way you can display it as either GMT or local. Is there another solution?  



     sel
        tran_ts,
        tran_ts at time zone interval -'06:00' hour to minute
     from transaction_log

So the best way would be a column with the time zone (TimeZone interval hour to minute) then it's:

     tran_ts at time zone TimeZone

Or you have to use a complex case:

     tran_ts at time zone
        case when location_id in (...) then interval -'06:00' hour to minute
        ...

Dieter



     
  <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