如何将日期时间参数作为邮递员中的日期发送
我正在尝试执行DateTime字段的位置,我只会通过日期,它应该提供必要的结果。以下是我正在尝试的URL,但是它不起作用,
https://hostname/oslc/os/table?oslc.select=assetnum, location&oslc.where=assetstatus.code="ABC" and siteid="XXXX" and assetstatus.location="204345104" and assetstatus.changedate="2022-06-18"
更改日期存储在数据库中,2022-06-18 08:00:01.0
,但是我们只会通过日期。
I'm trying to perform a GET where for a datetime field I shall pass only date and it should provide the necessary results. Below is the URL that I'm trying however it does not work
https://hostname/oslc/os/table?oslc.select=assetnum, location&oslc.where=assetstatus.code="ABC" and siteid="XXXX" and assetstatus.location="204345104" and assetstatus.changedate="2022-06-18"
The change date is stored in the database as 2022-06-18 08:00:01.0
however we would pass only date.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
传递参数
。
您可以像这样的邮递员中 sstatic.net/gszdacq.png“ rel =“ nofollow noreferrer”>
You can pass the parameters in Postman like this
&assetstatus.location=2022-06-18T08:00:01.0&assetstatus.changedate=2022-06-18T08:00:01.0
Postman(或HTTP)没有键入查询参数的概念。
OSLC查询仅需要在数据列表方面支持键入文字。您可以在 https://docs.oasis-open-projects.org/oslc-op/query/query/v3.0/oslc-query.html
您可以尝试通过
“ 2022-06-18T00:00:00:00:00 :00.0Z“ ^^ XSD:DateTime
而不是” 2022-06-18“
。Postman (or HTTP) does not have a concept of typed query parameters.
OSLC Query only requires support for the typed literals when it comes to datetimes. You read more about the OSLC Query format in https://docs.oasis-open-projects.org/oslc-op/query/v3.0/oslc-query.html
You can try to pass
"2022-06-18T00:00:00.0Z"^^xsd:dateTime
instead of"2022-06-18"
.