Announcement

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

  • creating quarter of birth dummy

    How can i create a quarter of birth dummy with a variable expressed as 01jan1999 ?
    thank you

  • #2
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str10 datestring
    "01jan1999"
    "01feb1999"
    "01mar1999"
    "01apr1999"
    "01may1999"
    "01sep1999"
    "01dec1999"
    end
    
    gen date = daily(datestring, "DMY")
    format date %td
    gen quarter = quarter(date)
    And please use dataex to provide data examples in future posts, as I did here. It gives the readers on this forum all the info they need on how your data s stored, amongst others. See more in the FAQ: https://www.statalist.org/forums/help#stata

    Comment


    • #3
      I think you need to give more details than that. https://www.statalist.org/forums/help#stata gives advice.

      Comment

      Working...
      X