Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

How to fetch only those users whose hire date is greater than current date via User import

Jaya
Regular Contributor II
Regular Contributor II

Hi All,

In Success Factor User Import query we are trying to fetch only those users in the query who will join in future that means hire date is greater than equal to current date.

For that we used below highlighted format but this didn't worked, can anyone please help in this.-

employmentNav/startDate>=date(cur(date))

Jaya_1-1683113372512.png

Thanks,

Jaya Karothia

 

Thanks
Jaya Karothia
7 REPLIES 7

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @Jaya 

Use the below format and try ( format it accordingly how the startdate is coming )

(new Date()).format('yyyy-MM-dd')

 

Thanks

Darshan

Jaya
Regular Contributor II
Regular Contributor II

Hi Darshan,

From success factor it is coming in epoch format, how can we convert date into epoch - any idea?

Thanks,

Jaya karothia

Thanks
Jaya Karothia

Darshanjain
Saviynt Employee
Saviynt Employee

you can use it as below and format it accordingly

startDate+gt+'${new Date().format('yyyy-MM-dd')}. ( this should work it internally calculates )

Note: if you are in 3.11 version and above instead of new Date you can use Calendar.getinstance like below

${Calendar.getInstance().getTime().format('yyyy-MM-dd')

 

 

Thanks

Darshan

Jaya
Regular Contributor II
Regular Contributor II

Hi Darshan,

Getting below error msg

Jaya_0-1683125771527.png

 

Thanks,

Jaya karothia

Thanks
Jaya Karothia

Darshanjain
Saviynt Employee
Saviynt Employee

IN postman you cannot use new date directly, the saviynt system calculates it, you need to use it saviynt and try to run the job. ( you can give hard code values in postman incase to validate )

 

Thanks

Darshan

Jaya
Regular Contributor II
Regular Contributor II

Not working in Saviynt too, see below error msg-

Jaya_0-1683180041651.png

Jaya_1-1683180104684.png

 

Thanks,

Jaya Karothia

 

Thanks
Jaya Karothia

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @Jaya 

This looks like a syntax issue ( illegal character -486 )  check if it is near new date format try removing the invited commas in the Api call and try. if not check where the Api url is going wrong.

Also as just said above, if you are using the version 3.11+ and above instead of new date use calendar date time instance.

 

Thanks

Darshan

 

Thanks

Darshan