now() comparison fails in Journey Condition Filter Expression | Community
Skip to main content
LuisCardenas
Level 2
September 30, 2025
Solved

now() comparison fails in Journey Condition Filter Expression

  • September 30, 2025
  • 1 reply
  • 206 views

 

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 

Best answer by SatheeskannaK

@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.

 

1 reply

SatheeskannaK
Community Advisor
SatheeskannaKCommunity AdvisorAccepted solution
Community Advisor
September 30, 2025

@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.

 

Thanks, Sathees