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: RE: RE: Counting Number of Week-Days


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Counting Number of Week-Days
Date   Wed, 8 Sep 2010 00:12:09 +0200

<>

***********
clear*

inp str10 date
4apr2010
15apr2010
end

gen mydate=date(date, "DMY")
set obs `=mydate[2]-mydate[1]+1'
replace mydate=mydate[1]+_n-1

form mydate %td
l
cou if !inlist(dow(mydate), 0, 6)
***********


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Simone Peart
Boyce
Sent: Mittwoch, 8. September 2010 00:03
To: Stata
Subject: st: RE: Counting Number of Week-Days

Thanks Nick.  That helps somewhat.  I actually have two dates that I would
like 
to count the number of weekdays that transpire between them.  If for
example, 
date1=4apr2010 and date2=15apr2010, how can I easily count the number of 
weekdays between those two dates?


________________________________



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