Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: remove weekend data


From   tashi lama <ltashi32@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: remove weekend data
Date   Thu, 31 May 2012 18:12:37 +0000

Hello all, 

There don't seem to have stata command or module to get rid of weekend data although I think I have just enough way to do it using some technique. I would like to present my solution in hope that I would get some feedback 

and other solutions. Say my dataset looks like

 

  date

03jan2012

04jan2012

05jan2012

06jan2012

07jan2012

08jan2012

 

gen dow=dow(date)

drop if dow==0  => to drop  sunday 

drop if dow==6  => to drop saturday 

 

Thanx... 

Tashi

  		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index