Logic Apps - liquid template - date conversion

FrederikL 1 Reputation point

I'm using liquid templates in logic apps / integration account to transform a JSON message, but I'm struggling with a date conversion.

The inputdate is datetime "2020-07-22T12:00:00" and I need to convert it to 2020-07-22"

But I don't find the right syntax for that.

Currently I have the following conversion in my liquid templates.

"executionDate": "{{ content.ExecutionDate | date: "%d/%m/%Y" }}",

But this returns "8/6/2020 12:00:00 PM"

How can this be done?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
1,818 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Noah Searle 6 Reputation points


    I was having exactly the same issue. It turns out the syntax isn't the same as on the Liquid docs. You need to use:
    "executionDate": "{{ content.ExecutionDate | Date: "dd/MM/yyyy" }}", notice the capitalisation of "Date"

    See following article for details:

    I hope that helps!

    No comments