在报告中给出财政年度的表达 [英] Expression to give fiscal year in report

查看:38
本文介绍了在报告中给出财政年度的表达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在报告中有这样一个表达式:

I have an expression in a report like so:

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

这给出了 DepositDate 中年份的最后 2 位数字,例如如果 DepositDate 是 7/1/2013,则给出 13.

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

不过,我需要的是财政年度,即从 7/1/2013 到 6/30/2014,因此 7/1/2013 给出了 14.

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.

我该怎么做?

推荐答案

为什么不在应用表达式之前添加 6 个月的日期?

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

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

这篇关于在报告中给出财政年度的表达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆