Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: transform date


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: transform date
Date   Wed, 3 Mar 2004 10:00:21 -0000

1.1.1980 is ambiguous on whether day.month.year
or month.day.year. No matter; you know, so 

di %tw  wofd(date("1.1.1980", "dmy")) 

or 

di %tw  wofd(date("1.1.1980", "mdy")) 

as appropriate shows a way to proceed. 

Given  a variable say -mydate-

gen week = wofd(date(mydate, "dmy")) 

etc. 

Nick 
[email protected] 

Martin Ebert
> 
> I have a little problem to transform dates in a daily format 
> (1.1.1980)
> to dates in a stata elapsed weekly format. Can Stata do this
> proceedure?

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index