Date Conversion in auto complete
Summary: We have a requirement to compare Date of Birth with identity number first 6 digit. In order to achieve the same we are trying to build this rule via auto complete rules. But struggling to find the correct date conversion option.
Either We have to convert the DOB to YYMMDD format or YYMMDD to Date format so as to compare both these date. Can anyone please help. Currently its failing even for correct entries.
Attaching the Grovy Script for the same:-
if( ( ((adf.source?.LegislationCode=="ZA")) &&
((adf.source?.NationalIdentifierType=="ORA_HRX_ID_NUMBER")) &&
(adf.source?.NationalIdentifierNumber != null) ) )
{
def var_stringVar_DOB1 = adf.util.subString(adf.source?.NationalIdentifierNumber,0,2 ) ;