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 :
Finance | Project Operations, Human Resources, ...
Answered

Insert datetimeutc in DataEntity

(0) ShareShare
ReportReport
Posted on by 65

Hi, 

I am developing a c# application that insert and get data in D365 via ODATA. My doubt is how to set datetime value when the type of data in D365 is utcDateTime. 

Is it correct to leave my values in UTC format or it is necessary to pass them in other format ? My question is because I am new in D365 and I don't know if could be consideration about the timezone preference of the user that the application uses for insert or retrieve data...

i would insert and filter the data using value in UTC in order to don't have problems to deploy my app in server with different timezones...

If there are some documentation about these arguments it will be appreciated. 

Thank you!

Michele

I have the same question (0)
  • Verified answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi Michele,

    UtcDateTime is equal to DateTimeOffset struct in C#, so it makes no difference to use UTC or local time (or another TimeZone) if time offset is correct.

    It can be easily tested if take one existing entity in D365 where datetime field is used and insert one record with UTC date time and one with local time. You will see that in the database it will be saved correctly in both cases as UTC.

  • Suggested answer
    MB-05091058-0 Profile Picture
    65 on at

    Hi Sergei,

    thank you.

    My application save datetime in UTC format and is perfect to send this information to D365 without logic of conversion... Probably my doubt is derived in the first test with date field and not datetime (in the dataentity this type is also datetimeoffset and i made a mistake!). your answer is correct!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 439 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans