Skip to Content
0

How to search using time field in the odata service?

Jun 21, 2017 at 08:17 AM

44

avatar image
Former Member

i am using filter query option in the odata service

/sap/opu/odata/ztest/MeasurementsSet?$filter=Mtime eq time'20:32:32'

or /sap/opu/odata/ztest/MeasurementsSet?$filter=Mtime eq '20:32:32'

MTIME --type is edm.time .

<Property Name="Mtime" Type="Edm.Time" Nullable="false" Precision="0" sap:label="MeasurementTime" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>

i am giving values mtime property to fetch the records in the entityset.

sap gateway is not accepting the above two URI format?

it's telling bad request or Invalid parametertype used at function..

which format i can use to fetch the records using TIME fields in the ENTITYSET Method?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Jun 21, 2017 at 10:37 AM
0

Hello Venkat,

Please send time as below and check -

/sap/opu/odata/ztest/MeasurementsSet?$filter=Mtime eq time'PT20H32M32S'

Regards,

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you Ashwin.

now it's working fine.

0