Expand my Community achievements bar.

Never miss an update of the Adobe Journey Optimizer Community Lens! Subscribe now to get the latest updates, insights, and highlights delivered straight to your inbox every time a new edition drops.
SOLVED

now() comparison fails in Journey Condition Filter Expression

Avatar

Level 2

 

Hi all,

 

I'm trying to use a Filter Expression as a Journey Condition in Adobe Journey Optimizer. I want to compare now() (or nowWithDelta()) with a profile date field, like this (anonymized paths):

 

 
now() < #{ProfileGroup.profile.campaign.expiry_date}
 

But I get the error: The expression is invalid: The expression has not a valid structure

 

Observations:

  • now() returns dateTime and the profile field is date.

  • Using toDateOnly(now()) or toDateTime(toString(...)) also fails.

  • Helper functions like toDateOnly() appear in the editor but are not highlighted in this context.

  • Other users seem to be able to use similar expressions in journey conditions.

Question:

  • Is there a supported way to compare now() or nowWithDelta() with a date profile field directly in a Journey Condition Filter Expression without creating a calculated attribute or modifying the schema?

CC: @Mohan_Dugganab @SatheeskannaK 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@LuisCardenas Yes, it's a supported function to use in the conditions by switching to advanced mode. If expirydate is a Date field, then toDateOnly(now()) should be effective. For example, this works when the birthdate is a date field.

Screenshot 2025-09-30 at 11.21.27 AM.png

 

Thanks, Sathees

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@LuisCardenas Yes, it's a supported function to use in the conditions by switching to advanced mode. If expirydate is a Date field, then toDateOnly(now()) should be effective. For example, this works when the birthdate is a date field.

Screenshot 2025-09-30 at 11.21.27 AM.png

 

Thanks, Sathees