cancel
Showing results for 
Search instead for 
Did you mean: 

Odata $filter does not work with AND Operation

BrijeshGandhi
Product and Topic Expert
Product and Topic Expert
0 Kudos
2,767

Hello ,

I'm facing an issue where Odata query works with 'OR" but not with 'AND' , could you convey what is wrong?

Working : ?$filter=(Zdate gt datetime'2018-02-01T00:00:00' or Zdate le datetime'2018-02-01T00:00:00')

Not Working : ?$filter=(Zdate gt datetime'2018-02-01T00:00:00' and Zdate le datetime'2018-02-01T00:00:00')

Accepted Solutions (1)

Accepted Solutions (1)

BrijeshGandhi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you Andre for your answer , I wanted to receive multiple line items based on date , where it should be between two date range.

What I figured out is , to get the data between two date range , correct filter query is : (AND operator does not work with GT / LT)

?$filter=(Zdate ge datetime'2018-02-01T00:00:00' and Zdate le datetime'2018-02-10T00:00:00')

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

Both timestamps seem to be identical.

There is no timestamp or number that can fulfill A > 0 and A<= 0 at the same time.