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 :
Small and medium business | Business Central, N...
Unanswered

OData date data type issue

(0) ShareShare
ReportReport
Posted on by 14
I'm publishing OData and there is inconsistency date data type
 
some date data type result type=edm.Date and json file show empty string (/ /). some are showing /0001-01-01/ (this is the correct one).
 
How to solve this issue? is there anything wrong with database?
I have the same question (0)
  • Judy Profile Picture
    Microsoft Employee on at
    Hi,
     
    Please refer to the Microsoft Document to map the type between date type in Database and Edm.Date type through the CLR System.DateTime type:
    Hope it helps.
     
    Best Regards,
    Judy
     
  • angelo_theus Profile Picture
    14 on at
    Hi Judy,
     
    the problem is that the result is inconsistent in Json Data for date data type.
     
    for example:
     
    "Birthday Date": "0001-01-01"
    "Posting Date": ""
     
    both fields are empty in Business Central interface but when we published the API, Json file shows as above. "Posting Date" should give value "0001-01-01".
  • Judy Profile Picture
    Microsoft Employee on at
    Hi angelo,
     
    Thank you for your feedback.
     
    It's hard to say what the root cause of the problem is, it is highly recommended that you can debug the code to verify if the OData publishing process is correctly mapping the date data type to the appropriate format in the JSON file.
     
    Best Regards,
    Judy

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans