on 2018 Jul 16 3:24 PM
Hi All,
I want to know how to pass time field Edm.Time value in filter parameter. I check https://archive.sap.com/discussions/thread/3558834 post and it guided me to pass $filter=(DepDate EQ datetime'2013-01-02T00:00:00') for Date fields and it works. In case of time field, when I pass DepTime EQ 'PT11H00M00S' it didnt work. I checked "Working with OData Dates and Times" Blog by John Patterson for formatting "DepartureTime": "PT11H00M00S" Time field value into 11:00 AM for displaying value in UI5. I want to know what format time value needs to be send in filter parameter and also in /IWFND/GW_CLIENT testing. Many thanks,
Raj
Request clarification before answering.
Referring from the OData V2 specification it should be 'Represents the time of day with values ranging from 0:00:00.x to 23:59:59.y, where x and y depend upon the precision' with example -
Example 1: PT13H20MIn your case try without single quotes.
http://www.odata.org/documentation/odata-version-2-0/overview/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ankit.maskara3 I have the sam issue. I have a Edm.Time field (CreatedAt from the BusinessPartner SAP API Business Hub) and I am trying to filter based on that field. I've tried
$filter=CreationTime eq PT13H20M
$filter=$filter=CreationTime eq 'PT13H20M'
and it returns an error 'Invalid parametertype used at function eq'. Any ideas on why this is not working?
This works:
https://archive.sap.com/discussions/thread/3965066
If it dosn't for you, then, let us see your EntitySet - property declaration, and how you send the data to backend.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe it's too late but I managed to work with an ODATA V2 like this:
$filter=CreationTime eq time'PT11H00M00S'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.