Quantcast
Viewing all articles
Browse latest Browse all 8223

Fetchxml cast date

Hello,

I'm using SSRS and fetchxml for do some reports in mscrm 2011.
I need get the total of appointments completed group by day.
I did that: 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" aggregate="true">
  <entity name="appointment">
<attribute name="scheduledstart" aggregate='countcolumn' alias='datecount' distinct='true' />
<filter type="and">
<condition attribute="ownerid" operator="eq" value="@Filter_User" />
</filter>
  </entity>
</fetch>

But "scheduledstart" is a DateTime field and i need only the Date.

I want that (in SQL):

SELECT COUNT(DISTINCT(CAST(ScheduledStart AS DATE))) AS ScheduledStart
FROM ActivityParty
WHERE OwnerId = '@Filter_User';

Any ideas?

TY ^^.



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>