none
Difference between EWS requests to Exchange online and onPrem Exchange 2010SP3 RRS feed

  • Question

  • I am considering moving from On-Prem Exchange to Exchange online and are now testing.
    Right now I have several pieces of code running regulary on a local server making EWS-request to our on-prem Exchange server.

    Based on this searchfilter I am going to find all contacts in Exchange with a particular birthday.

    SearchFilterCollection.Add(New SearchFilter.IsEqualTo(ContactSchema.Birthday, CDate(Persons_birthday))

    In my current setup (OnPrem Exchange 2010SP3) my code is running perfectly but when i test in Exchange onine environment the code fails and it fails because Persons_birthday (string)
    doesn't hold a time but only a date. When I explorer the Exchange contact and finds the time connected to his birthday and manually add this time in my code I can retrieve the correct contact.
    When somebody adds his birthday to the contact form in outlook you don't add a specific time but it is added automatically.

    In other words I would like to make a comparison in a searchfilter where I only compare the date and not the full SystemTime....and have it to run in an Exchange online environment.

     - Allan

    Tuesday, June 25, 2019 11:51 AM

All replies

  • >>In other words I would like to make a comparison in a searchfilter where I only compare the date and not the full SystemTime....and have it to run in an Exchange online environment.

    EqualTo won't work for you then try GreatorThan and LessThan to capture between the 24 hours of the date you want to query.

    Cheers
    Glen

    Friday, June 28, 2019 7:43 AM
  • Hi Glen

    Yes, that is also my temprorary solution so far but I can't really imagine that a data-comparisson in a Exchange Online environment always and mandatoroy includes the time. But if nobody knows of another solution i will have to implement the GreaterThan and LessThan method all around in my code. It can work:-)

     - Allan

    Tuesday, July 2, 2019 12:14 PM