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

st: Formatting of dates


From   "I.Mosca" <I.Mosca@uvt.nl>
To   statalist@hsphsun2.harvard.edu
Subject   st: Formatting of dates
Date   Fri, 09 Sep 2005 13:11:09 +0200

Dear Fellows,

we have an entry that looks like the following: 
1-1-2002 00:00:00
It is a string variable str19 %19s.

We'd like to transform it into a numerical/date format, but the information we want to keep is only the year.
How can we do that? 

Thanks for 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index