Announcement

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

  • Changing time format

    Hi Statalisters,

    The way Stata imports (from excel) the entries for the time variable are like "01jan2016", "02feb2016" and so on. I want it in the format "YYYYMM" i.e., "201601", "201602" and so on.

    Can anyone kindly advise on the code for this? Thank you.

    Best,

    Sam

  • #2
    Data example please (FAQ Advice #12)

    Comment


    • #3
      Hi Nick, thanks for the reference. Below is the time format I have:

      Click image for larger version

Name:	day_month_year.png
Views:	1
Size:	169.3 KB
ID:	1446698

      However, I want the time to be in this format:

      Click image for larger version

Name:	monthyear.png
Views:	1
Size:	169.3 KB
ID:	1446699

      Grateful if you could kindly advise.

      Thanks,

      Sam.

      Comment

      Working...
      X