cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Date/Time Format for SharePoint Calendar

I am having some difficulty with Date/Time formats in my flow.

 

The Flow is triggered by PowerApps (Canvas App) and is creating events in a SharePoint calendar (classic calendar, not modern).   

 

There are 2 parts to this flow.  The first part creates the SharePoint item (Create Item action) and then the second part updates that item to set the 'AllDayEvent' flag (Send an HTTP Request to SharePoint).

 

In the original version of the flow, the create item was using the datepicker selected date with no additional formatting from the PowerApps collection.    The calendar item was created successfully, but had a random time in each item.   The update step (Send and HTTP Request to SharePoint) errors out with the error:

 

"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-westus2-01.azure-apim.net",
"clientRequestId": "5ec2029c-f09f-4aee-84aa-1a63018c237d",
"message": "BadGateway",
"innerError": {
"message": "Invalid date/time value.\n\nA date/time field contains invalid data. Please check the value and try again.\r\nclientRequestId: 5ec2029c-f09f-4aee-84aa-1a63018c237d\r\nserviceRequestId: a6592d9f-6035-a000-9fa2-c271745bb65f",
"status": 502,
"errors": [
"-2130575332",
"Microsoft.SharePoint.SPException"
]
}
}
 
So I tried formatting the date coming out of PowerApps differently and that causes the create item step to fail.
 
Not sure what I need to do for it to see the date/time as valid.


If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
22 REPLIES 22

Let's try this.  

 

So copy this and paste it into the URI field:  _api/web/lists/getbytitle('Absence Calendar')/items(

Add the ID value from the dynamic values and then put the closing ) at the end.

 

This may not be the actual issue.   It looks like it might be referring to an issue with an item in the list.   Do you have an item in the Absence Calendar with the ID of 755?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Hedi69
Helper I
Helper I

IT WOOOOOOOOOOOOOOOOOOOOKS !!!!!!!  😊😀

Hedi69
Helper I
Helper I

Thank you so much @JR-BejeweledOne 

You are the best !!!!!!

Hedi69_0-1643406343109.png

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,840)