Announcement

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

  • Selecting cases based on range of dates

    I have a data file in excel. The dates are in MM/YYYY (e.g. 01/2010). Excel displays it as Jan-10.

    Using Stata, I imported the excel file. The date format becomes %tdMon-YY.

    I need to select cases based on a range of dates such as from Jan 2010 to Dec 2013. How should I go about doing so? Commands I tried using inrange or tim, have failed. Thanks for any help!


  • #2
    Can you expand a bit more what exactly failed? I think what you need is tin (read the help file).
    "If t has a %td format, you could type tin(5jan1992, 14apr2002)"

    Comment


    • #3
      Originally posted by Oded Mcdossi View Post
      Can you expand a bit more what exactly failed? I think what you need is tin (read the help file).
      "If t has a %td format, you could type tin(5jan1992, 14apr2002)"
      thanks! i was playing around, then changed the format from %tdMon-YY to %td. use the inrange function and it appeared to work.

      Comment

      Working...
      X