Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: dates
From
Eric Booth <[email protected]>
To
"<[email protected]>" <[email protected]>
Subject
Re: st: dates
Date
Tue, 14 Sep 2010 20:32:18 +0000
<>
******************!
clear
inp double(mydate)
01051987
09151973
12302005
end
tostring mydate, replace force format(%08.0f)
g mydate2 = date(mydate, "MDY")
format mydate2 %td
l mydate*
//or using the display format you described//
format mydate2 %tdMon_DD,_CCYY
******************!
~ Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]
Office: +979.845.6754
On Sep 14, 2010, at 3:10 PM, Michael Eisenberg wrote:
> Colleagues,
>
> I have a filed with dates listed as such
>
> 01051987 which is Jan 5, 1987
> 09151973 which is Sept 15, 1973
> 12302005 which is Dec 30, 2005
>
> How can I make stata automatically recognize that date format?
>
> Thank you in advance.
>
> Mike
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/