cancel
Showing results for 
Search instead for 
Did you mean: 

Datetimeoffset and datetime problem of filter in Integration Center

JunwooPark
Participant
0 Kudos

Hi experts,

I tested like as below, OData API with FODepartment history data.

this test for filters Integration center especially date filter.

1. result : 3 data - it is working properly with modified date and effective date.
This result extracts data after the modification date in the from and to date periods of the effective date.

apiXX.successfactors.com/odata/v2/FODepartment?$filter=lastModifiedDateTime+ge+'2021-06-14T00:00:00Z'+and+externalCode+eq+'209928'&&$format=json&fromDate=1900-01-01&toDate=9999-12-31&$select=externalCode,startDate,name_ko_KR,name_localized,lastModifiedDateTime

2. result : 4 data it is not working because of datetimeoffset in query. datetime also same result.
It is the same query, but if datetime and datetimeoffset are entered, all historical data of effective date from and to are displayed.

apiXX.successfactors.com/odata/v2/FODepartment?$filter=lastModifiedDateTime+ge+datetimeoffset '2021-06-14T00:00:00Z'+and+externalCode+eq+'209928'&&$format=json&fromDate=1900-01-01&toDate=9999-12-31&$select=externalCode,startDate,name_ko_KR,name_localized,lastModifiedDateTime

the datetimeoffset and datetime are used in integration center. you can check preview.
If we set the modified date to a later day than today in the advanced filters and also set the effective date in the time_based filters, the modified date filter is not applied to the result because of datetimeoffset and datetime. I check preview.

I guess, if we remove the datetimeoffset and datetime words from the date of the modified date filter, we can extract the job info or department history data with both filters..

Therefore, I want the integration center to remove the dateitmeoffset and datetime that take the date value. if we have to use these, I want to check what value these function(datetimeoffset, datetime) returns so why the result is messed up.

Best Regards
Leo.

Accepted Solutions (0)

Answers (1)

Answers (1)

CassioFernandes
Explorer
0 Kudos

Hi Leo,

You probably have figured out a solution by now. Your Test 2 returns results as expected, as per SAP documentation lastModifiedDateTime and $filter | SAP Help Portal. I also got confused why it behaves differently when using datetimeoffset/datetime functions. Maybe it was SAP way of letting extract results without historical data that was not changed. Maybe a SAP incident would clarify it. If you can share your solution, it would be great. Thanks! Cassio.