Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set date time format in Logic App

Tags:

azure

I have created an API which creates an excel having Date columns too. When I execute the code from local it works well and displays the date as expected.

When I try executing API via Logic App, it changes the date format of that field. How can I set date time in Logic App?

like image 884
Pooh Avatar asked Dec 24 '22 13:12

Pooh


2 Answers

When you have a fixed DateTime-Format you can use the Logic App function "formatDateTime" as follow:

formatDateTime(triggerBody()?['myDate'], 'yyyy-MM-dd')

You can find it under Expressions - Date and Time - "See more" - formatDateTime

like image 108
Celdus Avatar answered Jan 13 '23 08:01

Celdus


I found some useful documentation on Microsoft's site here:

https://learn.microsoft.com/en-us/azure/kusto/query/format-datetimefunction

Here it is .. in action:

enter image description here

like image 45
John Drinane Avatar answered Jan 13 '23 10:01

John Drinane