Command Reference : Function Reference : Function Reference: Q
  
 
@quarter
Quarter of the year of the observation.
Syntax: @quarter
Return: series
Returns the quarter of the year (1–4) associated with each observation in the workfile.
If the workfile is of lower than quarterly frequency, all observations will be set to 1.
If the workfile is undated, observations will be set to -1.
Examples
series dt = @quarter
saves the quarter into the series DT.
The command
smpl if @quarter = 4
sets the sample to only include fourth quarter observations.
Cross-references
See also @day, @hour, @hourf, @minute, @month, @seas, @second, @weekday, and @year.