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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

What does "Z" stands for in the DataTime value retrieved from Dynamics 365

(0) ShareShare
ReportReport
Posted on by 20

Hello All,

We have a query on DataTime attribute returned value in D365. 

For example;

I have two fields on the from new_timezoneindependent [Type: DateTime and Timezone Independent] and Createdon[DateTime & User Local]

pastedimage1583842297031v1.jpeg

When I retrieve the data;
pastedimage1583842715175v1.png

I want to understand the significance of the letter "Z" at the end of the value retrieved.

I thought it denotes the "UTC+0". If that is the case; in "new_timezoneindependent" should not return "2020-03-11T08:00:00Z"

Instead it should return "2020-03-11T08:00:00".

Please provide your views.
I have the same question (0)
  • Suggested answer
    Marco.P Profile Picture
    2,405 on at

    Timezone Independent means that the value is stored as it is, no matter user's time zone.

    But I guess the  retrieving format is the same both for User Local and Timezone Independent, fields, that's why you still get the "zulu" Z.

    UserLocal

    - Stores the date and time value as UTC value in the system.
    - The retrieve operation returns the UTC value.
    - The update operation converts the UTC value to the current user’s time zone value, and then stores the updated value as is or as the equivalent UTC value depending on the kind (DateTimeKind) of the value specified for update. If the specified value is of UTC kind, it’s stored as is. Otherwise, the UTC-equivalent value is stored.
    - Retrieving the formatted value converts from UTC to the user’s current time zone based on the time zone and locale setting of the user.
    - For the Web API, the attribute is exposed as DateTimeOffset.
    - This behavior is used for system attributes like CreatedOn and ModifiedOn, and cannot be changed. You should use this behavior for custom attributes where you want to store date and time values with the time zone information.

    TimeZoneIndependent - Stores the actual date and time values in the system regardless of the user time zone.
    - For the retrieve and update operations, no time zone conversion is performed, and actual date and time values are returned and updated respectively in the system regardless of the user time zone.
    - Retrieving the formatted value displays the date and time value (without any time zone conversion) based on the format as specified by the current user’s time zone and locale setting.
    - For the Web API, the attribute is exposed as DateTimeOffset.
    - This behavior should be used for attributes that store information such as check in and check out time for hotels.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/behavior-format-date-time-attribute

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans