I have an http request that updates a task in project that is triggered by clicking button in powerapps. I am however having an issue when trying to update the start date of the task since the data that I send through powerapps is not accepted.
This is the flow action that I use.
My issue occurs on the last line with Start. I am passing a SelectedData value from a Date Picker object in Power Apps.
I am getting an error saying: Cannot convert a primitive value to the expected type 'Edm.DateTime'. Do I need to cast? I am not very familiar with JSON. Thank you.
Solved! Go to Solution.
I looked into and found out that I needed to format the date into the ISO 8601 format.
Text(UpdateStartDateInput.SelectedDate,"[$-en-US]yyyy-mm-ddThh:mm:ss") worked for me.
Hi @Mgodby ,
First, you need to make sure that the value of this Dynamic content output is not empty.
Second, you can try to format this value into the format required by the Start field using the formatDateTime() function.
Please take a try.
Best Regards,
I looked into and found out that I needed to format the date into the ISO 8601 format.
Text(UpdateStartDateInput.SelectedDate,"[$-en-US]yyyy-mm-ddThh:mm:ss") worked for me.
Hi @Mgodby ,
If you have found a solution to the issue, please click "Accept as Solution" on the reply that describes how you were able to solve your issue!
Best Regards,
The solution the OP wrote in the reply is the solution to this problem.
I had the same issue and none of the convert or date format options in Flow resolved it. I also had to format my date in the PowerApp using this:
Text(dpDate.SelectedDate,"[$-en-US]yyyy-mm-ddThh:mm:ss")
And then use that value from the parse JSON action directly in the Send HTTP request. Every other date from the various formatting and convert methods that were recommended in other posts and answers failed with the original 'Cannot convert a primitive value to the expected type 'Edm.DateTime' error. This is the only solution that worked.
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 |
---|---|
14 | |
14 | |
10 | |
7 | |
6 |
User | Count |
---|---|
20 | |
16 | |
10 | |
9 | |
8 |