on 2016 Sep 09 9:25 AM
Hello experts,
As stated in the below article - SAP HANA Developer Guide for SAP HANA Studio - SAP Library
SAP HANA XS currently supports OData version 2.0, which you can use to send OData queries (for example, using the HTTP GET
method). Language encoding is restricted to UTF-8.
When is SAP HANA XS going to support Odata version 4.0(latest)? Odata 4.0 has support for a number of functions such as date(), time(), etc which aren't available with Odata 2.0.
Also since SAP HANA XS currently supports OData version 2.0, how should I compare a field whose data type in HANA is 'Date' by providing a value in the Odata URL ?
Eg -
http://hanaserver/my/user/services/getContract.xsodata/ContractBalance?$filter=VALID_FROM le ??&$format=json
Which value should be in the place of ?? in the above URL?
Tried using different date formats such as 2016-09-09 or /1451865600000/ etc. Nothing works.
Please help me out.
Request clarification before answering.
Hello Gowthami,
an option would be to use the OData v2 supported functions "year", "month" and "day".
For the filter "<= 2016-09-09" the URL would look like following:
.../getContract.xsodata/ContractBalance?$format=json&$filter=year(VALID_FROM) lt 2016 or ( year(VALID_FROM) eq 2016 and month(VALID_FROM) lt 09) or ( year(VALID_FROM) eq 2016 and month(VALID_FROM) eq 09 and day(VALID_FROM) le 09 )
In words
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.