Expression to give fiscal year in report

一笑奈何 提交于 2020-05-18 02:33:38

问题


I have an expression in a report like so:

=Year(First(Fields!DepositDate.Value, "dsetCoverSheet")) Mod 100

This gives the last 2 digits of the year in DepositDate, e.g. if DepositDate is 7/1/2013, it gives 13.

What I need though, is fiscal year, which is from 7/1/2013 to 6/30/2014, so that 7/1/2013 gives a 14.

How do I do this?


回答1:


Why not add 6 months to the date before applying the expression?

=Year(DateAdd(DateInterval.Month
    , 6
    , First(Fields!DepositDate.Value, "dsetCoverSheet")))
  Mod 100


来源:https://stackoverflow.com/questions/19257983/expression-to-give-fiscal-year-in-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!