Expand my Community achievements bar.

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

AJO Advanced editor Code Logic- Get Week from DateTime Object

Avatar

Level 2

HI All,

I am trying to get week derived from now() in AJO Advanced editor. There is no helper function for this in adobe documentation. Let me know if there is any other way to get this. Thanks

Example -
The date 2025-10-25 falls in ISO week number 43 of the year.

AI Response-

If you need dynamic week numbers in AJO:

  • Webhook Option: Call an external service that returns the ISO week number for now().
  • Custom Field Option: Precompute the week number in your data pipeline and pass it into AJO.
  • Static Mapping Option: Use a lookup table inside AJO to map date ranges to week numbers.
1 Reply

Avatar

Employee Advisor

If this is in the message personalization editor, following function can be used https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalizatio... 

{%= weekOfYear(datetime) %}

 

If it is in advanced expression of condition nodes/waits/custom actions etc., weekOfYear function is not available in the function list