Hi,
I'm working on a shortlisting process for recruitment. For this the requirement states that applicants be filtered on number of experience.
The input is number of experience required.
The query is applied on HcmPersonProfessionalExperience
Following is the query
query = new Query(); qbds = query.addDataSource(tableNum(HcmPersonProfessionalExperience)); qbr = qbds.addRange(fieldNum(HcmPersonProfessionalExperience,StartDate)); qbr.value(strFmt('(%1 - %2) <= %3', fieldStr(HcmPersonProfessionalExperience, EndDate) , fieldStr(HcmPersonProfessionalExperience,StartDate), 5)); queryRun = new QueryRun (query);
This is code I started with. But this filters on number of days.
I tried using SysQueryUtilRange::YearRange , DatetimeUtil::year and year functions but it did not work.
The EndDate and StartDate are transdate
My question: can I filter the query on number of years equal to the experience required.