cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

the Datetime/DatetimeOffset format for filtering data when executing the API call

Kaito2
Explorer
0 Likes
686

Dear Community,

I am currently experiencing issues with filtering a date-type entity when executing the API call. 

I tried these formats on the API Purchase Order(ODataV4) to filter data using the Try Out feature on Business Accelerator Hub.

$filter=LastChangeDateTime gt '2020-05-20T00:00:00Z'

$filter=LastChangeDateTime gt datetimeoffset'2020-05-20T00:00:00Z'

$filter=LastChangeDateTime gt datetimeoffset'2020-05-20T00:00:00.000Z'

However, none of them worked, and I received this error message.

{
  "error": {
    "code": "005056A509B11EE1BB8AF4A65EC3CA20",
    "message": {
      "lang": "en",
      "value": "Invalid parametertype used at function 'gt' (Position: 14)"
    },
    "innererror": {
      "transactionid": "600414ADECD10160E0067EE577579611",
      "timestamp": "20250404072147.4033660",
      "Error_Resolution": {
        "SAP_Transaction": "For backend administrators: use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
        "SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
      }
    }
  }
}

Please can someone tell me how I can filter data-type entities? What format is correct?

I'm not sure but I heard Datetime is not available for OData4, so if there is any way to filter data-type entities, I would appreceate it if you gave me some advice!!

 

Thanks.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Aukasz_SaBek
Active Participant
0 Likes

Hi Kaito2, 

please check answer from this post -> this should help You. 

https://community.sap.com/t5/enterprise-resource-planning-q-a/how-to-use-date-time-filter-values-in-...

Best regards, Łukasz

Kaito2
Explorer
0 Likes
Thank you Lukasz! In my case, this format worked: LastChangeDateTime gt 2025-03-13T01:00:07.227889Z

Answers (0)