Statalist


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

RE: st: RE: date function


From   "Steichen, Thomas J." <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: date function
Date   Fri, 26 Oct 2007 15:08:12 -0400

Requires cap letters:  gen mydate=date( surgery_date, "DMY")


-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------
 
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tina Hernandez-Boussard
Sent: Friday, October 26, 2007 3:01 PM
To: [email protected]
Subject: Re: st: RE: date function

Sorry, typo, but still get the error:

gen mydate=date( surgery_date, "dmy")
(737 missing values generated)




On Oct 26, 2007, at 11:55 AM, Nick Cox wrote:

> mdy? dmy! N
>
> Tina Hernandez-Boussard
>
> Looking for some help converting my string data to a %td.
>
> My date is a str11 as follows:
>
>     | surgery_d~e |
>       |-------------|
>    1. | 20-Jun-2005 |
>    2. | 22-Mar-2005 |
>    3. | 29-Nov-2005 |
>    4. | 18-Apr-2006 |
>    5. | 28-Sep-2004 |
>
> When I try to convert this is a date, gen mydate=date( surgery_date,
> "mdy")
>
> I just get a variable with all values missing.
>
> *
> *   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/

-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
unlawful.   

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