Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Losing timestamp going from SPSS to STATA

    I've been reading about how to deal with changes in date format going from SPSS to STATA so I was prepared for it to display differently however I'm not sure how to deal with the following.

    Data has been entered into SPSS as a DATETIME20 variable so it looks like this:

    2-Feb-2011 10:20:00

    However when I export the SPSS as a STATA file all the variable contains is the date:

    02 Feb 11

    but the time information (I don't require the date) seems to have gone.

    Is there a way of displaying time data?

    any advice much appreciated.

    Matt

  • #2
    First, we need to see an actual example from your Stata data set using the -dataex- command. It may be that with a change of display format the time will appear. Or it may be that the time was truly lost in the importation process. To comment further on that, it would also be necessary to know how you imported the data from SPSS to Stata.

    If you are running version 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    I cannot overly stress the importance of using -dataex- to show your example here. It is the only way to assure that the necessary information will be available in the example.

    Comment

    Working...
    X