Bookmark and Share

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: Importing data/time variables from Excel


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Importing data/time variables from Excel
Date   Thu, 29 Aug 2013 17:51:52 +0000

Dear Stata community,

I have a spreadsheet which has a column of date/time values.  However, because it is formatted to display just the date, when I import it into Stata (12.1) sometimes it re-formats it as a date and throws away the time data.  This doesn't happen consistently for some reason.

Is there any way to force Stata to recognize this column as a date/time and override its natural whims?  I have a number of spreadsheets like this and will probably have to re-import new versions from time to time, so I would rather not go into each spreadsheet before every import and re-format the column.

Thanks for your help.

Regards,
Joe Canner
Johns Hopkins University School of Medicine.

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index