Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 09 Jan 2009 @ 16:04:03 GMT


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


Subj:   Extracting Week from date
 
From:   Ragavendran Srinivasanmanikandan

Hi All,

How to extract calendar week from a date?

When extracting week of year using the below query , week 1 starts from first Sunday of the year.

     SELECT calendar_date,week_of_month,
                  week_of_year,
                  month_of_quarter,
                  quarter_of_year

     FROM sys_calendar.calendar

Is there anyway to extract week such that from Jan 1, week 1 should start irrespect of the day?

In Oracle to_char(sysdate , 'yyyy-ww') gives year and week. Do we have anyway to get the same result in Teradata?


Regards

Ragavendran S



     
  <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: 27 Dec 2016