Statalist


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

st: Re: Date format not working


From   "mai mai" <[email protected]>
To   [email protected]
Subject   st: Re: Date format not working
Date   Wed, 3 Oct 2007 15:31:10 -0400

Ok, I figured it out:
gen date2 = date(date, "DM20Y")

Pls ignore last email. The confusing part was that in Stata 10 the
command should be in capital letters for DMY

Thanks!

On 10/3/07, mai mai <[email protected]> wrote:
> Hi,
> i am not able to change the format of my data into date format in
> Stata 10. My date variable is in this format which is %9s
> 04-JAN-04
> 13-MAY-04
> 16-MAY-04
> ...
>
> I tried:  generate date1=date( date,"DMY")
> but it's not working, I get all missing fields.
>
> I appreciate your help!
>
*
*   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