Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Jun 2002 @ 21:35:46 GMT


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


Subj:   Re: Creating months table
 
From:   Mark Landry

  I have another question related. What is the difference between weekday_of_month and week_of_month?  



The weekday_of_month is used to find, for example, the 2nd Sunday of the month; the week_of_month is the ordinal value of the number of complete weeks in the month. Partial first weeks are week 0.

calendar_date   weekday_of_month   week_of_month
2002-05-31 5 4
2002-06-01 1 0 -- 1st Saturday of the month; week 0 (partial)
2002-06-02 1 1
2002-06-03 1 1
2002-06-04 1 1
2002-06-05 1 1
2002-06-06 1 1
2002-06-07 1 1
2002-06-08 2 1 -- 2nd Saturday of the month; week 1
2002-06-09 2 2
2002-06-10 2 2
2002-06-11 2 2
2002-06-12 2 2
...


     
  <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