web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Date Filter Issue in Production Web Service (OnPrem)

(6) ShareShare
ReportReport
Posted on by 16
Hello Community, 

 I'm facing an issue with an API in Business Central. When I apply a date filter in the sandbox environment, it works perfectly. However, when I try the same filter in the production environment, it filters data for the previous day. For example, if I apply a filter for 2025-05-02, it returns data for 2025-05-01.

I've tried using both BC web services and API pages, but the problem persists. Has anyone else experienced this issue or have any suggestions on how to resolve it? Any help would be greatly appreciated!
 
ScreenShots:::
 
Production:-
 
 
 
SandBox:-
 

Thanks in advance!
 

Best regards,
Neel Ramani
I have the same question (0)
  • Verified answer
    Ramesh Kumar Profile Picture
    7,547 Super User 2026 Season 1 on at

    This behavior is very likely related to a time zone mismatch between your sandbox and production environments, especially in how date/time values are interpreted or stored in Business Central.

    1. Standardize time zones

    Ensure that both environments use the same time zone setting in the Admin Center.

    2. Adjust filter to UTC : If time zones cannot be aligned:

    1. Manually adjust your date filters in production to account for the shift.
    2. Use T00:00:00Z and T23:59:59Z in UTC when using datetime filters.

    3. Inspect Page/API Source : If you created a custom API/page, ensure the field types are:

    1. Date → avoids time zone interpretation.
    2. DateTime → always affected by time zone and must be handled carefully.
     
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
     
  • Gerardo Rentería García Profile Picture
    25,709 Most Valuable Professional on at

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,823 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,011 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 628 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans