I'm trying to transmit Start Date and End Date from DataPickers into SQL-Query in Power Automate.
But my flow executes with errors, when I choose the dates between 12 and 31.07.
I convert date17.07.2020 into 2020-07-17 in power automate defining string variables and compose expressions:
formatDateTime(triggerBody()['sql-qury-execute_query'],'yyyy-dd-MM')
I receive error message:
Unable to process template language expressions in action 'ConvertVarFromDate' inputs at line '1' and column '2333': 'In function 'formatDateTime', the value provided for date time string '17.07.2020' was not valid. The datetime string must match ISO 8601 format.'
Solved! Go to Solution.
Hi @Anonymous ,
Please try the following method and expression:
concat(split(outputs('Compose'),'.')[2],'-',split(outputs('Compose'),'.')[1],'-',split(outputs('Compose'),'.')[0])
Best Regards,
Hi @Anonymous ,
Please try the following method and expression:
concat(split(outputs('Compose'),'.')[2],'-',split(outputs('Compose'),'.')[1],'-',split(outputs('Compose'),'.')[0])
Best Regards,
Hi @v-bacao-msft,
Thanks a lot for your help!
Your method works in my case, when the browser language is german.
Following expression works, if the input date format is July 29, 2020
formatDateTime(triggerBody()['sql-qury-execute_query'],'yyyy-dd-MM')
I noticed, that if I set english language in my browser, the DataPicket in PowerApps transmit the in Format July 29, 2020. But if the browser language is german, the date format is 29.07.2020. Is it possible to recognise the date format in Power Automate with date template and execute different flow ways with if condition?
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
40 | |
36 | |
35 | |
34 | |
27 |
User | Count |
---|---|
39 | |
38 | |
33 | |
31 | |
24 |