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

Submissions are now open for the 2026 Adobe Experience Maker Awards.
해결됨

Date Functions in Adobe Journey Optimizer for query parameters

Avatar

Level 2

I have the following requirement: An email communication containing a countdown is required. From this, the email communication should be sent to customers with the counter starting on the date the email communication is sent and ending, for example, in seven days.

Currently the countdown is running using a fixed value, i.e. regardless of the date of sending the e-mail communication. For this, I am using the following script:

 

<img src="https://i.countdownmail.com/3iru0d.gif?end_date_time=2024-09-10T16:47:17+00:00" border="0" alt="countdownmail.com" class="is-highlight" style="text-align: center;">

 

To use the email communication send date, I tried to use the Adobe Journey Optimizer functions in the script described above:

 

<img src={%= concat("https://i.countdownmail.com/3iru0d.gif?end_date_time=", setDays(now(), 7)) %} border="0" alt="countdownmail.com"/>

 

However, I got the following result:

 

Invalid syntax Error in parsing PQL expression "concat("https://i.countdownmail.com/3iru0d.gif?end_date_time=", setDays(now(), 7))": line 1:71 extraneous input '(' expecting {')', ','}. Error beginning at position: Line 1, Character 10

 

Thanks in advance

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee Advisor

You can validate it on the following lines 

{% let d = toDateTimeOnly(currentTimeInMillis()+7*1000*60*60*24) %}
{% let x = formatDate(d, "yyyy-MM-ddTHH:MM:SSZ") %}
{% let y = concat("https://i.countdownmail.com/3iru0d.gif?end_date_time=",x) %}
<img src={{y}} border="0" alt="countdownmail.com"/>

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Employee Advisor

You can validate it on the following lines 

{% let d = toDateTimeOnly(currentTimeInMillis()+7*1000*60*60*24) %}
{% let x = formatDate(d, "yyyy-MM-ddTHH:MM:SSZ") %}
{% let y = concat("https://i.countdownmail.com/3iru0d.gif?end_date_time=",x) %}
<img src={{y}} border="0" alt="countdownmail.com"/>