내 커뮤니티 업적 표시줄을 확대합니다.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
해결됨

Retrive Day of the Week

Avatar

Level 2

Hi,

How can I retrieve the day of the week using the AJO Advanced Expression Editor? I'm encountering the following error when using the syntax {%= dayOfWeek(now()) %}.

Date Time functions library | Adobe Journey Optimizer

 

SanmathiKumar_0-1726050599699.png

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee Advisor
4 답변 개

Avatar

Employee Advisor

You can try it on the following lines 

{% let d = now %}
{% let dayOfWeek = dayOfWeek(d) %}
 
{%#if dayOfWeek = 3%}
"Wednesday"
{%else%}
"Something else"
{%/if%}

Avatar

Level 2

@Mohan_Dugganab, Thank you for the response.

 

In the content template and email designer, we have helper functions that include the day of the week, so I can leverage your code there. However, I want to achieve this day of the week functionality in journey condition activity. Is that possible?

Avatar

정확한 답변 작성자:
Employee Advisor

Avatar

Level 2

@Mohan_Dugganab, The above approach works when we're only checking for the day of the week.

 

But, The use case involves checking if it's a weekend, and if so, the profile should wait until a weekday. If it's a weekday but falls on a public holiday, the profile should wait until the next valid day. I want to implement this in AJO using the fewest possible activities.