Announcements
Hi There,
Looking to confirm if changing the Behaviour of a Date and Time Field from User Local to Date Only will change any current records.
this is Dynamics online.. Field setting is behaviour = user local, format = date only.
My understanding is that the current values will remain in database as UTC time and the change only effects records created or updated from the point of the Field change.
thanks in advance
Hi partner,
Maybe I didn't make myself clear. Yes, whatever the behaviour you choose, nothing will happen in the database.
I created a new datetime field and to make the results more clearly, I chose the format to 'date and time', then I changed the format from User Local to Date Only and here are the results in database and client.
1.User Local
Client: 2020-02-11 12:00 AM
Database: 2020-02-10 16:00:00.000
2.Date Only
Client: 2020-02-10
Database: 2020-02-10 16:00:00.000
From the above picture, we could know that whatever the behaviour or format we choose in datetime field, the value will never change in database, it's always UTC time.
Best Regards,
Leo
Hi Leo,
Thanks again.
the query was related to changing the behaviour from User Local to Date Only and what if anything happens to the value in the database.
thanks
Hi smcconnell,
Thanks for your details.
Still correct, even if we changed the datetime to user local, there would be no change in database level.
Since we could not access to database directly in online version, I did a test in my on-premise instance.
There's an OOB field "createdon" which is user local in account form and we can see that the value is different between client and database.
And if we work with datetime in plug-ins or sdks, the datetime value we get is the value in database not in client.
Hope it helps.
Best Regards,
Leo
Hi Leo,
thanks for the reply.
I've read the documentation so i'm aware of the potential changes on the front end based on a users personal settings.
my query is more on what happens to the current records at the database level. so if i was to access those records through a plugin/sdk i'm assuming there would be no change seen there?
thanks
Hi partner,
You are correct.
The value is stored in common date base as UTC time and it will show as local time in the field according to the user's language/locale. When we change the field format, all values in this field will display in a new format.
https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/behavior-format-date-time-field
Best Regards,
Leo
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,807 Super User 2024 Season 2
Martin Dráb 229,135 Most Valuable Professional
nmaenpaa 101,156