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

Re: st: converting dates


From   Daniel Egan <[email protected]>
To   [email protected]
Subject   Re: st: converting dates
Date   Tue, 19 Jul 2005 14:49:42 -0400

Hi Dave, 

Try: 
findit todate
ssc install todate

On 7/19/05, David Kantor <[email protected]> wrote:
> Hi.
> 
> I have a set of dates as str8, with values such as "19960718".  I want to
> convert these to elapsed date values, but the date function doesn't seem to
> work; date("19960718", "ymd") yields missing.
> 
> Is there something I'm not aware of to make this work? -- some alternation
> of the pattern ("ymd")?
> I note that date("1996/07/18", "ymd") works fine, but that's not the form
> my data are in.  I also know how to split the strings and work on the
> components.  But is there a simple one-step way to do it?
> 
> Thanks,
> -- David
> 
> David Kantor
> Institute for Policy Studies
> Johns Hopkins University
> [email protected]
> 410-516-5404
> 
> *
> *   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/



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