Example: Comparing dates

When you compare an attribute with a date value, the date value must be wrapped in the date function—see Understanding supported functions. The date function is required to explicitly indicate that the value is a date.

The following example shows the correct way to compare the LastUpdateDate attribute in a substitution expression.
{id.123.response.TCRMPersonBObj.TCRMPersonNameBObj[where LastUpdateDate > 
     date('2005-05-17 16:48:11.047')].
PersonNameIdPK}
The following example shows an incorrect way to compare the NameUsageType attribute in a substitution expression.
{id.123.response.TCRMPersonBObj.TCRMPersonNameBObj[where LastUpdateDate > 
     '2005-05-17 16:48:11.047'].PersonNameIdPK}

If you do not wrap the date value with the date function, the framework assumes that the value is a string and may not be able to compare the values correctly.

When you compare date values, you can use any one of the six comparison operators.