Modules
Sign in
Get Help

BMS API | When using a filter in a call with date/time object, I get an Error 400

Problem

I am trying to use a filter on dates in the API call and I get a status failed response; how can I resolve this? 

"A binary operator with incompatible types was detected. Found operand types 'Edm.DateTime' and 'Edm.String' for operator kind 'LessThan'".

Resolution

This occurs when Edm.String is used; use the Edm type datetime instead.

Examples:

1. https://serverurl/api/servicedesk/tickets/timelogs?$filter=StartDate lt '2019-01-21T21:44:45.257​'

2. $filter=OpenDate eq DateTime'2018-09-21T21:44:45.257

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section