Expand my Community achievements bar.

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.
SOLVED

How to change date format in AJO

Avatar

Level 1

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"

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You can use the following snippet 

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

View solution in original post

3 Replies

Avatar

Community Advisor

@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") %}

Thanks, Sathees

Avatar

Correct answer by
Employee Advisor

You can use the following snippet 

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

Avatar

Level 2

How to change the date to datetime format?