Skip to main content
Jun 21, 2024 12:09 PM UTC
Solved

How to change date format in AJO

Hello,

I do have date format like this "formatdate(now(), "%BI %2D %4Y")" in ACC but  I want to use this in AJO. How this can be achieved. Expected result is "JUNE 21 2024"

 

 

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
Jun 21, 2024 6:06 PM UTC

You can use the following snippet 

{% let d=now %} {%= formatDate(d, "LLLL dd YYYY") %}

3 replies

SatheeskannaK
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Jun 21, 2024 1:12 PM UTC

@santhoshdh Try along these lines,

   

{% let d=now %}

    {% let m=getMonth(d)%}

    {% let dispMonth=""%}

    {%#if m=1 %}

    {% let dispMonth="Jan"%}

    {% else if m=2 %}

    {% let dispMonth="Feb"%}

    {% else if m=3 %}

    {% let dispMonth="Mar"%}

    {% else if m=4 %}

    {% let dispMonth="Apr"%}

    {% else if m=5 %}

    {% let dispMonth="May"%}

    {% else if m=6 %}

    {% let dispMonth="Jun"%}

    {% else if m=7 %}

    {% let dispMonth="Jul"%}

    {%/if%}

    {{ dispMonth }} {%= formatDate(d, "dd, YYYY") %}

Translate
Thanks, Sathees
Mohan_Dugganab
Adobe Employee
Mohan_DugganabAdobe EmployeeAccepted solution
Adobe Employee
Jun 21, 2024 6:06 PM UTC

You can use the following snippet 

{% let d=now %} {%= formatDate(d, "LLLL dd YYYY") %}
Translate
Level 2
Jun 26, 2024 1:02 PM UTC

How to change the date to datetime format?

Translate