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]
st: convert date in string data type to integer data type
From
Whitney Cox <[email protected]>
To
[email protected]
Subject
st: convert date in string data type to integer data type
Date
Thu, 29 Nov 2012 08:23:51 -0700
I have a Stata .dta file that contains a date in a str10 data type field
with the format of %10s that displays a date as 01/31/2012
I want to convert it to an integer data type with the format
%tdNN/DD/CCYY, which displays as 01/31/2012
What should my command be to do that?
Thanks - Whit
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/