2014-11-04 120 views
0

筛选我有一个DateTime参数:如何通过一年fetchxml

enter image description here

随着FetchXML,我将尝试只是我的日期时间参数的年份部分过滤我的数据:

<filter type="and"> 
<condition attribute="proposedstart" operator="in" value="@EventYear"/> 
</filter> 

proposedstart日期时间@EventYear日期时间

我知道做到这一点的方法之一是说on-or-beforeeventyear + 1on-or-after1/1/eventyear

我怎样才能解决这个问题? 如何过滤FetchXML中datetime字段的年份与我的datetime参数相同的年份?

回答

0

您可以格式化您的日期时间参数,以便只获取年份部分。

表达里面放像:

=Format(Parameters!EventYear.value,"yyyy")