Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Xrm.WebApi.retrieveMultipleRecords issue with stored UTC date/time

(0) ShareShare
ReportReport
Posted on by
User records were batch imported. At the time if import, dataverse recorded 
{@odata.etag: 'W/"27078907"', cr249_snpclientid: 'ec2515d8-xxxx', cr249_dateofbirth@OData.Community.Display.V1.FormattedValue: '12/15/1950', cr249_dateofbirth: '1950-12-16T00:00:00Z', cr249_lastname: 'Smith'}
 
I try to implement Xrm.WebApi.retrieveMultipleRecords to filter out those that were born, say 12/16/1950 based on the date picked from a calendar. But the search will filter by the actual UTC date stored in the record and return those with birthdate 12/15/1950. I need to find a way to make it search based on the OData.Community.Display.V1.FormattedValue or somehow convert the date using timezoneoffset so that 12/16/1950 should become 12/17/1950 in order to get those with FormattedValue 12/16/1950.
 
var searchDob = birthDate.toISOString().split("T")[0] + "T00:00:00.000Z";
            Xrm.WebApi.retrieveMultipleRecords("cr249_snpclient", "?$select=cr249_dateofbirth,cr249_lastname&$filter=cr249_dateofbirth eq " + searchDob).then(
Categories:
  • Suggested answer
    Ramesh Kumar Profile Picture
    5,458 on at
    Xrm.WebApi.retrieveMultipleRecords issue with stored UTC date/time
    Looks like time zone issue in dataverse.  Instead of filtering with eq (which checks exact UTC), filter using a range that covers the entire day in UTC.
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
     
     
     
     
     
     

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans