如何在LogicApp中更改英国日期格式

时间:2020-11-12 20:12:36

标签: datetime azure-logic-apps date-conversion formatdatetime

我正在尝试将英国的输入日期(dd-MM-yyyy)转换为格式(yyyy-MM-dd)

我尝试过

"as": true

但出现错误:

"well": "as"

如何转换此输入日期?输入格式为(dd-MM-yyyy),无法更改。

我可以轻松地从(MM-dd-yyyy)转换,如下所示,但是我无法从(dd-MM-yyyy)转换

"flags": "with values"

1 个答案:

答案 0 :(得分:1)

Date and time functions提供的

azure logic app无法识别dd-MM-yyyy格式的时间戳。

研究之后,没有可以直接解决此问题的现有功能,但是您可以使用substringconcat来解决此问题。

逻辑应用程序的工作流程如下:

enter image description here

formatDataTime的表达式:

formatDateTime(concat(substring(<your-date-string>,6,4),'-',substring(<your-date-string>,3,2),'-',substring(<your-date-string>,0,2)),'yyyy-MM-dd')