Which timezone is considered when querying CRM using DateTime in ConditionExpression? RRS feed

  • Question

  • Hi All,

    When we query CRM to retrieve records with conditions based on DateTime fields, which timezone will be considered, UTC or the User's Timezone.


    We have a custom entity, where we have a DateTime field, say DueDate.   I need to retrieve all records where the DueDate is today.  When we write a ConditionExpression with such a condition like shown below, which timezone will it consider for comparing today's date against, whether it will be DueDateUTC or the user's (who created the custom entity record) timezone DueDate?

    ConditionExpression condExp = new ConditionExpression("duedate", ConditionOperator.On, DateTime.Today);

    Please help me in finding this.

    Thanks in advance for any help.


    Wednesday, January 15, 2014 2:50 PM