generates a URL of
https://mri.cts-mrp.eu/portal/v1/odata/ProductSearch?$filter=UpdatedAt%20ge%202000-02-05T08%3A48%3A36%2B08%3A00%20and%20UpdatedAt%20le%202023-03-05T08%3A48%3A36%2B08%3A00%20and%20domainKey%20eq%20%27h%27&$expand=activeSubstances,atcCodes,doseForms,rms&$skip=0&$top=10
this results in an error from the server
"The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThanOrEqual'."
The server is actually expecting
https://mri.cts-mrp.eu/portal/v1/odata/ProductSearch?$filter=UpdatedAt%20ge%202022-12-27T18%3A54%3A09%2B08%3A00%20and%20UpdatedAt%20le%202023-01-27T18%3A54%3A09%2B08%3A00%20and%20domainKey%20eq%20%27h%27&$expand=activeSubstances,atcCodes,doseForms,rms&$count=true&$skip=10&$top=10
It appears it wants the dates URL encoded and not surrounded by single quotes (')
Any suggestions? - it would be nice not to need to urlencode the dates in my code
my code:
generates a URL of
https://mri.cts-mrp.eu/portal/v1/odata/ProductSearch?$filter=UpdatedAt%20ge%202000-02-05T08%3A48%3A36%2B08%3A00%20and%20UpdatedAt%20le%202023-03-05T08%3A48%3A36%2B08%3A00%20and%20domainKey%20eq%20%27h%27&$expand=activeSubstances,atcCodes,doseForms,rms&$skip=0&$top=10
this results in an error from the server
"The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThanOrEqual'."
The server is actually expecting
https://mri.cts-mrp.eu/portal/v1/odata/ProductSearch?$filter=UpdatedAt%20ge%202022-12-27T18%3A54%3A09%2B08%3A00%20and%20UpdatedAt%20le%202023-01-27T18%3A54%3A09%2B08%3A00%20and%20domainKey%20eq%20%27h%27&$expand=activeSubstances,atcCodes,doseForms,rms&$count=true&$skip=10&$top=10
It appears it wants the dates URL encoded and not surrounded by single quotes (')
Any suggestions? - it would be nice not to need to urlencode the dates in my code