[英]Odata url conversion of date using between
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我如何将其转换为 Odata 服务中的 URL
我解决了这个查询转换成这样的 URL
$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
可以这样查询: http://service/odata/Products?$filter=dates gt datetime'2012-10-26' and dates lt datetime'2012-10-27
'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.