How to change date format in AJO | Community
Skip to main content
June 21, 2024
Solved

How to change date format in AJO

  • June 21, 2024
  • 2 replies
  • 1273 views

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.
Best answer by Mohan_Dugganab

You can use the following snippet 

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

2 replies

SatheeskannaK
Community Advisor
Community Advisor
June 21, 2024

@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
Mohan_Dugganab
Adobe Employee
Mohan_DugganabAdobe EmployeeAccepted solution
Adobe Employee
June 21, 2024

You can use the following snippet 

{% let d=now %} {%= formatDate(d, "LLLL dd YYYY") %}
Level 2
June 26, 2024

How to change the date to datetime format?