Announcement

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

  • Merging on the basis of Date for CRSP stocks data

    Hello,

    I am merging the CRSP stock prices dataset with the CRSP value-weighted index on the basis of the date. I encountered an error in doing so, upon browsing I came to know that the date format is changed in both of these files. In the first one, the date is in the form of 03jan2005 while in the second one it is in the form of 20040102. I have taken help from the stata help but it does not work for me. Kindly someone over here assists me in this regard. I will be really thankful.

  • #2
    Welcome to Statalist.

    Stata's "date and time" variables are complicated and there is a lot to learn. If you have not already read the very detailed Chapter 24 (Working with dates and times) of the Stata User's Guide PDF, do so now. If you have, it's time for a refresher. After that, the help datetime documentation will usually be enough to point the way. You can't remember everything; even the most experienced users end up referring to the help datetime documentation or back to the manual for details. But at least you will get a good understanding of the basics and the underlying principles. An investment of time that will be amply repaid.

    All Stata manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu.

    Comment

    Working...
    X