cancel
Showing results for 
Search instead for 
Did you mean: 

How to search using time field in the odata service?

0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor

Hello Venkat,

Please send time as below and check -

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

Regards,

0 Kudos

Thank you Ashwin.

now it's working fine.

Answers (0)