Date comparison Error

Hello Everyone,

I have return the date compare transform but it showing error while running the transform. Can you please conform, can we able to compare two different dates in transform? if yes can you please provided the sample transform

{
    "name": "Datecheck",
    "type": "static",
    "attributes": {
                "TDate": {
                    "attributes": {
                        "sourceName": "Example source",
                        "attributeName": "EndDate"
                    },
                    "type": "accountAttribute"
                },
				 "EDate": {
                    "attributes": {
                        "sourceName": "Example source",
                        "attributeName": "Entry Date"
                    },
                    "type": "accountAttribute"
                },
                "value": "#if($TDate <= EDate) Date compare #{elseif}($TDate >= EDate) Date compare 2 #{else} Test failed #end"
    }
}

Hi Suresh,

Try to use date compare transform. In your code you are using static instead of date transform
},
“operator”: “gte”,
“positiveCondition”: “yes”,
“negativeCondition”: “no”
},
“type”: “dateCompare”

Change the logic accordingly firstdate greater than equal secondate here.

1 Like