I have a Flow that I believe I want to run daily with a Start Time (example: 2024-05-07T05:00:00:000Z). I then want to Select items from the previous day through the day the Flow runs (-4 hours). So...
StartDate = addDay(utcNow(),-1) "based on my exampleabove, this would be 2024-05-06T05:00:00:000Z"
EndDate = 2024-05-07T01:00:00:000Z
How do I write the EndDate in the addDay(utcNow()) format?
Hi @RJF61 ,
Since I am in the UTC+8 zone, I need to add 8 hours to the utcNow() time to get the current date.
Today's date add '05:00:00.000Z' is used as the end date.
Then subtract 20 hours to get the time minus 4 hours from the previous day as the start date.
addHours(addHours(utcNow(),8,'yyyy-MM-ddT05:00:00.000Z'),-20,'yyyy-MM-ddTHH:mm:ss.000Z')
addHours(utcNow(), 8, 'yyyy-MM-ddT05:00:00.000Z')
Best Regards,
Sunshine Gu
I am guessing you're asking for a query filter. I include the StartOfDay expression with the utcNow() expression. Then for the filter query, I use where start date expression is ge (greater than or equal to) and the end date expression is lt (less than). StartOfDay will return the date starting at midnight. If you are pulling from a SharePoint list, all dates are stored in UTC.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1