Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers!
I have a dataset with dates in it and I want to split the file on quarters. I can convert the variabele to quarters with years with "FORMATS variable (QYR)." but when I split on this variable it still remembers the underlying dates.
FORMATS just affects how a date is displayed. It doesn't change the underlying values. You can extract the quarter for a date like this.
compute qtr = xdate.quarter(yourdatevariable).