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

st: RE: date formatting


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: date formatting
Date   Thu, 19 Feb 2004 13:03:34 -0000

There is an FAQ 

How do I convert date variables into Stata elapsed dates 
when the numbers run together, like 4151999? 

at http://www.stata.com/support/faqs/data/dateseq.html

A canned solution is offered by -todate- on SSC. 

Nick 
[email protected] 

[email protected]
 
> A simple question for which I've had trouble finding an answer:
> 
> A file has a date variable without delimiters -
> 
> 19930407
> 19911201
> 19971103
> 
> 
> I need to extract the first four digits as a new variable 'year'.

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