locked
FetchXML need to modify for date difference RRS feed

  • Question

  • Hi All,

    I need to calculate number of days from using fetchxml. 

    How to use datediff function in fetchxml to get how many number of days are present between two days. 


    Friday, October 3, 2014 10:57 PM

All replies

  • You don't specify if you are doing this query server-side (Plugin/Workflow), client side (JavaScript), or in SSRS for a report. 

    • If you are doing this server side, pull your results down via a RetrieveMultiple or through Linq into an IEnumerable variant, then apply a Lamda to it with your datediff function.
    • If you are doing this client side, you will have to retrieve all your results, then filter them with a datediff function manually.
    • Through SSRS, you can use native SQL instead of the FetchXml to invoke native SQL functions.
    Tuesday, October 7, 2014 8:29 PM