web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Date and Time display - Multi country customers in CRM and their history / audit log

(0) ShareShare
ReportReport
Posted on by

Hi,

We use CRM to store our customer data who are in different countries. So, the obvious choice of timezone for CRM DB, BackEnd, ForntEnd server is UTC. Please correct me if I am wrong. We use SDK to pump in data and use UTC for all dates. We have country specific support team who look at their country specific customer data such as orders and audit data. We would like the support team to see all date-time in customer's timezone. How can we achieve this in CRM?

Thanks,

Sai

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Drew Poggemann Profile Picture
    4 on at
    RE: Date and Time display - Multi country customers in CRM and their history / audit log

    HI Sai,

    What a great idea!

    A good quick article from Power Objects on dates in CRM (old but still true):

    www.powerobjects.com/.../crm-2011-truths-about-datetime

    1.  What if you created a field on the entity that would be set by a workflow that contained the timezone offset for the customer from UTC time.    This would be something like -5 for the value.  Now, this may need to be run daily as a background job to handle daylight savings time?

    2.  You could then use a calculated field containing the value of:  SUBTRACTHOURS() function that would subtract the hours from another field to display in customer's timezone.

    Note - this is definitely not a perfect approach and would be a challenge for countries like Venezuela and others that have a -4.5 hour difference :(

    Hopefully this is enough to start the discussion on other options (or much better options):

    Link to credit that made me think about this as an option:  community.dynamics.com/.../new-calculated-field-functions-in-crmonline-update-1

    Thanks much and hope this helps somewhat...

  • Community Member Profile Picture
    on at
    RE: Date and Time display - Multi country customers in CRM and their history / audit log

    Hi Raz,

    Thank you. Can you elaborate below points please?

    4) DateTime Set through CRM Web Services is user’s local time zone by default, Note that extra care must be taken to understand whether the call is done with the calling user or a service user

    5) DateTime set through CRM Web Services can be defined to be UTC instead

    We use SDK and may be looking at shifting to Web API soon. As of now, we use a designated user account to perform all SDK calls (GetProxy() is supplied with credentials). This means different country operations are performed using one user account. Is this OK? Should we change it?

    Also, the date is set in C# code as someVar = Datetime.UtcNow; Is this OK?

    Regards,

    Sai

  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at
    RE: Date and Time display - Multi country customers in CRM and their history / audit log

    Hi Sai, Here are the rules you need to know to understand how Timezones work in CRM;

    1) DateTime is saved in database as UTC time

    2) DateTime in CRM UI is always shown based on user’s local time zone.

    3) DateTime Retrieved through CRM Web Services is always UTC time

    4) DateTime Set through CRM Web Services is user’s local time zone by default, Note that extra care must be taken to understand whether the call is done with the calling user or a service user

    5) DateTime set through CRM Web Services can be defined to be UTC instead

    6) DateTime queried directly from SQL table or base view returns UTC

    7) DateTime queried from filtered view returns users local time

    I Hope this answers your question, Kindly Verify :)

    Best Wishes, Raz

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans