Announcement

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

  • Elapsed Dates in Stata

    I have an elapsed date variable (eEventDate for month, day, year) in STATA and I want to know the value for a particular date.
    For example, I want to know the value of my elapsed date variable (eEventDate) for 06jan2016. If I scroll on the browser, I can see the value is 20459 (which corresponds to the number of days since 01jan1960). However, it is very tedious to repeat this process for all dates that I might be interested in.
    How can I ask Stata to return the value of my elapsed date for a particular day that I am interested in?

    Thanks in advance.

  • #2
    If you want to display the numeric value of eEventDate in, for example, the 12th observation in your data set, you can run
    Code:
    display %12.0f eEventDate[12]

    Comment


    • #3
      Code:
      display daily("06jan2016", "DMY")
      is an answer to another interpretation of the question.

      Comment

      Working...
      X