Skip to main content
Level 2
Jul 1, 2024 1:53 PM UTC
Solved

How to get the yesterday date in AJO?

How to get the yesterday date in AJO?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Mohan_Dugganab
Mohan_DugganabAccepted solution
Adobe Employee
Jul 3, 2024 3:14 AM UTC

If you need this for personalization in the messages, either setDays function or the following snippet can be used 

 

{% let yest = currentTimeInMillis() - 86400000 %}
{% let computedDate = toDateTimeOnly(yest) %}
{%= formatDate(computedDate, "dd/MM/yyyy") %}

 

Reference - https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/functions/dates#set-days

 

 

3 replies

Mohan_Dugganab
Adobe Employee
Mohan_DugganabAdobe EmployeeAccepted solution
Adobe Employee
Jul 3, 2024 3:14 AM UTC

If you need this for personalization in the messages, either setDays function or the following snippet can be used 

 

{% let yest = currentTimeInMillis() - 86400000 %}
{% let computedDate = toDateTimeOnly(yest) %}
{%= formatDate(computedDate, "dd/MM/yyyy") %}

 

Reference - https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/functions/dates#set-days

 

 

Translate
Sukrity_Wadhwa
Level 4
Jul 19, 2024 12:35 PM UTC

Hi @niteshsingh,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!

Translate
Sukrity Wadhwa