Discussion
how to compare date using expression builder
I want to compare a date (if it is in the past )in when condition of an activity
the input date was given in yyyymmdd format and the when condition given was @(Pega-RULES:DateTime).isDateInThePast(.pyLabel) using expression builder
But this is not working,the condition is false always no matter what date I give
Can anyone suggest a solution?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Hi,
The function works fine. Now, because you are using .pyLabel (String/text) you need to convert this first using a temp property and use something like:
Or use another function such as: @(Pega-RULES:DateTime).pxDateTimeisPastOrFuture(@(Pega-RULES:String).toDate(.StringMMMYYDD), true)
Pega Academy Support Team