Announcement

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

  • How to reformat date to yyyy-mm

    Hi dear Stata users!

    I am trying to reformate my date variable from yyyy-mm-dd to yyyy-mm but nothing is working although it feels like it should be quite simple. What code can I use for this?

    And if someone has a better idea for the analysis I am all ears. We have various different data sets that will be merged but their dates are not the same so we thought we should only write month and year but if something else could work better we would love to hear it.

    Best regards,
    Hanna

  • #2
    Welcome to the statalist. You asked your question on the sub-forum on Mata (Stata's matrix language). However, this is a question for the general forum. Can you post the question there? Also, add an example of your date variable using dataex as is described in the Statalist FAQ (link is in the black bar near the top of this page)
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi!

      Thanks for letting me know, did not realize there are different forums

      Comment

      Working...
      X