Announcement

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

  • Convert calendar date to fiscal quarters

    Dear all,

    I've a question on how to convert calendar dates to different (i.e. fiscal) quarters in Stata 16.1.

    I'm using two databases that have different ways to classify years. To ensure consistency and comparability, I want to convert for one of the databases' calendar dates to fiscal quarters. The fiscal year runs from June 1st in year 1 through May 31th in year t+1. Therefore, the first fiscal quarter should start from June 1st through August 31th, the second fiscal quarter should start September 1st through November 31th ,and etc.

    So far, I used the following codes, though with no luck:

    Code:
    gen fquarter=quarter(calendardate)
    replace fquarter=fquarter-1 if month(calendardate)>=6 & month(calendardate)<=8
    Does anyone know how to convert it?

    Any help is much appreciated!

    Kind regards,

    Dennis
Working...
X