Announcement

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

  • Reformatting a monthly date variable

    I have a date variable in month-year format that looks like "2012m8". I got to that format using the command
    HTML Code:
    format mdate %tm
    I am trying to convert the format to something like "August2012". The help file for "datetime" isn't getting me there. I'm sure its an easy fix. Any advice?

    Nick

  • #2
    Code:
    format date %tmMonthCCYY

    Comment


    • #3
      Originally posted by Ken Chui View Post
      Code:
      format date %tmMonthCCYY
      You're a boss. Thank you!

      Comment


      • #4
        A note for those who encounter this topic in the future: the help file for datetime contains a link - at the bottom of the basic formats display table - to
        Code:
        help datetime display formats
        which documents how to construct more interesting formats for Stata datetime values.

        Comment

        Working...
        X