Question

I have query like this

 select * 
from xxx 
where dates between '2012-10-26' and '2012-10-27'

How can i convert this to URL in Odata Services

Was it helpful?

Solution

It can be queried like this: http://service/odata/Products?$filter=dates gt datetime'2012-10-26' and dates lt datetime'2012-10-27'

OTHER TIPS

i solved this query converted to URL like this

$format=json&$filter=year(LastModifiedDate)+ge+2012+and+month(LastModifiedDate)+ge+09+and+day(LastModifiedDate)+ge+25+and+hour(LastModifiedDate)+ge+00+and+minute(LastModifiedDate)+ge+00+and+second(LastModifiedDate)+ge+00+and+year(LastModifiedDate)+le+2012+and+month(LastModifiedDate)+le+12+and+day(LastModifiedDate)+le+31+and+hour(LastModifiedDate)+le+23+and+minute(LastModifiedDate)+le+59+and+second(LastModifiedDate)+le+59
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top