Hi @Kiran001,
Can you try formatting the date input into ISO format before passing it to the dateCompare transform?
The dateCompare transform recommends that the input should be on ISO8601 format,
And according to the dateFormat transform, ISO format looks like the following,
The updated transform might look like,
{
"name": "LCS",
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"sourceName": "Test source",
"attributeName": "HIREDATE"
},
"type": "accountAttribute"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": "now",
"operator": "lt",
"positiveCondition": "prehire",
"negativeCondition": "active"
}
}
Also I would recommend you to use firstValid if you think there could be accounts without that attribute. In that case the code may look like,
{
"name": "LCS",
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "Test source",
"attributeName": "HIREDATE"
},
"type": "accountAttribute"
},
"1995-12-31"
]
},
"type": "firstValid",
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": "now",
"operator": "lt",
"positiveCondition": "prehire",
"negativeCondition": "active"
}
}
Hope this solves the issue.