|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: date function
Thanks Sergiy and Arun. Both are interesting solutions and do the job.
For some reason, I thought there was a specific date function that did
this.
-p
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Sergiy
Radyakin
Sent: Wednesday, February 06, 2008 4:22 PM
To: [email protected]
Subject: Re: st: date function
This will do it:
di ceil(strpos("jan feb mar apr may jun jul aug sep oct nov dec",
"oct")/4)
Sergiy Radyakin
On 2/6/08, Visintainer, Paul <[email protected]> wrote:
> Is there a date function that converts a string variable containing
only the text of the month into a numeric version of the month? e.g.:
X has string values October, April, December, etc. I want to create a
new variable that is numeric with numbers 10, 04, 12, etc. I thought
-monthly( )- would do it, but I can't seem to get the right syntax.
>
> Thanks.
>
> -p
>
>
> ______________________________________
> Paul F. Visintainer, PhD
>
> *
> * 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/
>
*
* 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/
*
* 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/