Announcement

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

  • Labeling tsline axis with 4-digit year

    I am trying to label the x-axis of my plot with the 4-digit year.

    When I try
    Code:
    tsset date  
    tsline earnings, tlabel(, format(%tdyy))
    I can see 2-digit dates on the axis (80, 90, 0, 10, 20), but I don't see an option for a 4-digit date in the datetime display formats help file. I would like the axis to be (1980, 1990, 2000, 2010, 2020). When I exclude the tlabel option, my dates are in the format 01jan1980, 01jan1990, etc.

  • #2
    Today is July 6 2018 where I am now. To see just the year I can go

    Code:
    . di %tdCY mdy(7, 6, 2018)
    2018

    Comment


    • #3
      Thanks, that worked perfectly.

      Comment

      Working...
      X