Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

When I select March 14, 2021 in a date field it defaults back to March 13, 2021 instead, why?

Posted on by 2,645

Hello,

I have a date field called, "Effective Date" and when I select the date of 3/14/2021, and then click off the field, it automatically changes the date to 3/13/2021.  When I go back and select 3/14/2021 and tab off the field again, it stays.  What would cause it to go to 3/13/2021?  I do not have a business rule and don't see any workflows that is causing this to happen.  This is on the Opportunity record.  The "Effective Date" field is setup as:

Data Type = Date and Time

Field Type = Simple

Behavior = User Local

Format = Date Only

IME Mode = auto

It only happens for this date that I can tell and it happens to multiple users.  Any ideas on how to fix this? Please let me know, thank you.

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: When I select March 14, 2021 in a date field it defaults back to March 13, 2021 instead, why?

    Hi,

    Thank you for your query.

    When the Behavior is "User Local", date is stored with the User 's Local time (this means the time information is taken from client machine). This is possible, in edge cases, due to time information (which is in UTC), date value can take you a day back (based on time information stored along with Date).

    Please note, Format property controls how you want to display the value, when set to Date Only, it doesn't mean time part is ignored. Time part is still stored along with Date.

    To fix this, you can change the Behavior to Date Only, this way the ate value will be stored with default time (12:00 AM) and date will not be changed (you can think of this Date Only field). 

    pastedimage1610258397491v1.png

    You can read more about Date Behaviors here:

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/behavior-format-date-time-attribute#specify-the-behavior-of-a-date-and-time-attribute

  • Verified answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: When I select March 14, 2021 in a date field it defaults back to March 13, 2021 instead, why?

    I will investigate in this direction, is there any Javascript or plugin/action code doing date manipulation. Although you mentioned about Business rule and workflow, double check the logic everywhere & verify with other team members.

    Another possibility is - timezone. If the record is created/updated by an user in US timezone will have previous date, but the same record field will show next day for Australia users. It is expected bcoz of User local setting and that too for a date only field.

    Change it to timezone independent in lower environment and test it to verify this issue is fixed. Then do it in production.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans