[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: week number in month
On Apr 2, 2007, at 5:39 AM, A. Manzoni wrote:
I have the week number (and the week day as well, in a separate
variable) and I would like to obtain the month from it. The year is
fixed (I have one file from 1968 and one from 1874). DOes anyone
know if there is a function to trasform the week in the month?
Is this what you're looking for?
. di %tm mofd(dofw(yw(2007,14)))
2007m4
(Note that you can add the day of the week inside the call to -mofd
()-, if you wish.) Regardless, -help tdates- will give you
everything you need.
-- Phil
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/