I have a need for a flow to check a SP column value and depending on this value set a time constraint that can then trigger a condition. Easier if I show an example.
If the Value is AM then the created time of the Item in SP needs to be before 08:00am else another action. If the item was created before 08:00 on that day then no other action required.
This is for facility checks needing to be conducted within an hour of their shift time.
My column is a choice and i have 5 selections, each with their own times.
0700 AM
0800 OFFICE
0830 FACILITY 1
1500 PM
2300 NIGHTS.
Any idea how I could put this into a flow? I can put parralel branches with Conditions for each area, but how would I set the condition of the time?
From my understanding, when you convert a time zone in Power Automate and specify the source and destination time zones, it takes into account daylight savings time and adjusts accordingly. I never did any testing on this, but nobody has complained to me about it yet. 🙂
Thank you, Annoyingly I will also need to account for DST also. Assuming there is a way to take this into account in the UK?
P.S. don't forget that SharePoint stores dates in UTC format, so you may need to convert the created date/time to another time zone first and use the expression on the converted date.
I would use the formatDateTime function to format just the hours of the Created date in 24-hour format and convert it to an int:
int(formatDateTime(triggerOutputs()?['body/Created'],'HH'))
You could use the expression in a condition to check if the result is less than or greater than 8 depending on which side of the condition you want to proceed. I am not sure how the five choices relate to the need to check if the time is before 8 a.m. though.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492