web
You’re offline. This is a read only version of the page.
close
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:
I have the same question (0)
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,529 Super User 2025 Season 2 on at
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 45 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans