Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
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

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

You can use the following snippet 

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