Calculate fiscal year in SQL Server

前端 未结 19 1446
时光说笑
时光说笑 2020-12-16 13:28

How would you calculate the fiscal year from a date field in a view in SQL Server?

19条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 13:41

    More simple for Australians :)

    (YEAR(DATEADD(Month,-((DATEPART(Month,[Date])+5) %12),[Date]))+) AS Financial_Year

提交回复
热议问题