cancel
Showing results for 
Search instead for 
Did you mean: 

CreatedDateTime filter in OData api is not working as Expected

saikrishna7029
Explorer
0 Kudos

Hi Everyone,

Thank you for your time and assisting us.

Issue: Records are being missed out in extraction.

Business Objective: To Fetch all the newly created Employees in SAP Successfactors using OData api on a recurring basis.

Existing Solution: we are using EmpJob entity and clubbed with createdDateTime filter and we make request to Successfactors server for everyone hour to fetch any newly created records in the system.

Timestamp for Delta Executions: we are using the same timestamp which server returns in Header APIQueryExecutionTimestamp.

API:

https://api5.successfactors.eu/odata/v2/EmpJob?$filter=createdDateTime ge datetimeoffset'2023-12-21T13:50:04.702Z'&$expand=companyNav,customString4Nav,customString5Nav,departmentNav,divisionNav,locationNav,managerUserNav,managerUserNav/manager,eventNav/picklistLabels,eventNav,eventReasonNav,userNav,employeeClassNav/picklistLabels,employeeClassNav,customString2Nav,customString8Nav/picklistLabels,customString3Nav,employmentNav/empJobRelationshipNav/relUserNav,businessUnitNav,costCenterNav&$select=startDate,userId,company,costCenter,costCenterNav/name,countryOfCompany,customString2,customString3,customString4,customString5,department,division,employeeClass,event,eventReason,jobTitle,lastModifiedDateTime,location,managerId,payGrade,companyNav/name_en_GB,customString4Nav/externalName_en_GB,customString5Nav/externalName_en_GB,departmentNav/name_en_GB,divisionNav/name_en_GB,locationNav/name,managerUserNav/defaultFullName,managerUserNav/email,managerUserNav/manager/userId,managerUserNav/manager/defaultFullName,managerUserNav/manager/email,eventNav/picklistLabels/label,eventReasonNav/name,userNav/firstName,userNav/lastName,userNav/email,employeeClassNav/picklistLabels/label,createdDateTime,createdBy,customString2Nav/name,jobCode,localJobTitle,customString7,customString8,customString8Nav/picklistLabels/label,hireDate,customString3Nav/name,businessUnit,businessUnitNav/name&fromDate=2023-09-01&toDate=9999-12-31

Bais
Participant
0 Kudos

example: lastModifiedDateTime gt datetimeoffset'2022-06-08T00:02:36Z'

change date in your filter with 70Z instead 702Z:

$filter=createdDateTime ge datetimeoffset'2023-12-21T13:50:04.70Z'

Accepted Solutions (0)

Answers (0)