Assigning Dates to Fiscal Year

后端 未结 4 1900
野的像风
野的像风 2020-11-28 11:14

I\'m trying to come up with some code that will look at a date and then assign it to a fiscal year. I\'m totally stuck.

I have a variable that contains dates in POS

4条回答
  •  余生分开走
    2020-11-28 12:07

    Adding to G. Grothendieck's nice response. With lubridate:

    year(dates) + (month(dates) >= 5)
    

提交回复
热议问题