Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 10 Mar 2012 @ 20:08:31 GMT


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


Subj:   Finding day of the week.
 
From:   filipsil

I have a TIMESTAMP field and would like to find the day of the week. But I'm not getting, anyone done something similar?

     Select

     CASE (( ?cast('2011-12-18 12:13:36' as date) - DATE '1900-01-01') Mod 7) + 1

     WHEN 0 THEN 'Sun'
     WHEN 1 THEN 'Mon'
     WHEN 2 THEN 'Tue'
     WHEN 3 THEN 'Wed'
     WHEN 4 THEN 'Thu'
     WHEN 5 THEN 'Fri'
     WHEN 6 THEN 'Sat' END

att,

Filipe da Silva
IBM Brasil - GBS / AS



     
  <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