Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: name of day of week


From   Christopher Baum <[email protected]>
To   "Markus Klemusch" <[email protected]>
Subject   st: Re: name of day of week
Date   Tue, 19 Aug 2008 14:24:37 -0400

No, tsmktim is not the answer. But there is a dow() function:

sysuse sp500,clear
g dayofweek = dow(date)
forv i=0/6 {
	local w: word `=`i'+1' of `c(Weekdays)'
	local wd "`wd' `i' `w'"
}
label def dow `wd'
label val dayofweek dow
l date dayofweek in 1/20


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html

On Aug 19, 2008, at 9:33 AM, Markus Klemusch wrote:

Dear Mr. Baum,

I am a german student and I need to know some information about stata because I am using it now to make some calculations for my thesis.

I am searching something in stata giving me the opportunity to create something like calendar days, I mean Monday etc. I already know how to use month(), day() and year(), but I have to identify the name of the day. So, are you aware of any possibilities to do so in stata? Is the stata module mentioned above in the headline a solution to this problem?

Best regards

Markus Klemusch


--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal f�r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index