Announcements
Hi,
I am sending a collection via JSON from PowerApps to PowerAutomate and then to an SQL procedure. Everything is working correctly except that for all datetime fields that I send, PowerAutomate is adding 5 hours. The data is correct in the collection and then when I check the JSON in PowerAutomate it has added 5 hours. Anyone have an idea why that might be happening?
@DeeCiii15
Flow reads all times as UTC times, therefore you need to convert these to your local time. I tend to used the addHours() function but there's also the 'Convert Time' function that you can use as well.
The other option is to adjust your times before they go to Flow inside PowerApps using the DateAdd() function.
Okay I was not aware of that. I have been trying to figure out the best way to overcome this. In my solution I store a collection as a variable in Powerapps, pass that JSON to PowerAutomate and then send the JSON to an SQL stored procedure. Is there a way to do the conversion while keeping it in JSON format? I cant think of a way.
You could try removing 5hrs from your dates in your collection before converting to JSON, like this?
UpdateIf( yourCollection, true, // true here Updates all records in the collection { Date: DateAdd( ThisRecord.Date, -5, Hours) // Add extra fields here as needed } )
This is more of a workaround I guess but should work. There's probably a 'nicer' way to do this in Flow but I cannot think of it at the moment
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 354 Super User 2026 Season 2
M Bilal Khan 330
Mohsin Ali 232