Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Fetch XML , filtering on time

(0) ShareShare
ReportReport
Posted on by 1,019

How to filter on the time part of the date in fetch xml between two days

*This post is locked for comments

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,231 on at
    RE: Fetch XML , filtering on time

    Hi James,

    You can use On-or-After and On-or-Before to retrieve based on time criteria as shown below:

    <filter type="and">

         <condition attribute="actualstart" operator="on-or-after" value="2018-11-01" />

         <condition attribute="actualend" operator="on-or-before" value="2018-11-01" />

       </filter>

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 Moderator on at
    RE: Fetch XML , filtering on time

    Hi,

    There is no operator currently for New than X Days/Weeks/Months.

    Hope this helps.

  • Sompop Profile Picture
    Sompop 25 on at
    RE: Fetch XML , filtering on time

    Hi there,

    I am wondering if you know how to filter with "Newer Than X Days/Weeks/Months" instead of "Older Than X Days/Weeks/Months" for Dynamics 365 version 9.

    Thanks in advance.

    Regards,

    Sompop Charusaengrit

  • Suggested answer
    RE: Fetch XML , filtering on time

    You can refer this also:

    backtothecrm.blogspot.com/.../how-to-filter-on-time-part-of-date-in.html

  • Suggested answer
    RE: Fetch XML , filtering on time

    Hi James,

    Use this:

    <condition attribute=“<AttributeName>” operator=”olderthan-x-days” values=”<VALUE>” />

    For your reference:

    www.powerobjects.com/.../support-for-additional-older-than-clauses-for-date-and-time-fields-in-fetchxml-and-queryexpression

    Hope this helps

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 Moderator on at
    RE: Fetch XML , filtering on time

    Hi James,

    Please check the below blog.

    community.dynamics.com/.../how-to-filter-on-the-time-part-of-a-date-in-fetchxml

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans