I have a flow that is paused until a specific date in a SharePoint column, the date in SP is in the format dd/mm/yyyy; in order to the Delay Until step to work I had to set a variable to format the date to yyyy-MM-dd.
The flow works and is triggered by the input at 12:00 Midday.
How do I get to change the time to midnigh Z 00:00Z? So that the flow is triggered at that time instead of 12:00Z
The code below is the formatted dated:
formatDateTime(triggerOutputs()?['body/Date_x0020_Effective_x0020_From'],'yyyy-MM-ddThh:mm:ssZ')
Solved! Go to Solution.
I might have cracked it! I am just testing it so see the outcome!
I have change the Format Date code to 00:00:00Z instead of hh:mm:ssZ:
formatDateTime(triggerOutputs()?['body/Date_x0020_Effective_x0020_From'],'yyyy-MM-ddT00:00:00Z')
I guess if the input is made at 1/8/2021 12:00 midday, and the timestamp input in the ‘delay until’ action you want is 1/9/2021 00:00 midnight. Am I right?
You do not need to set variable. Just put an expression in the timestamp as below.
addDays(startOfDay(formatDateTime(triggerOutputs()?['headers/date'],'yyyy-MM-ddThh:mm:ssZ')),1)
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks but I am still confused, the Date Effective From is a column set to date only in the SharePoint library, the user enters a plane date in the format dd/mm/yyyy at some stage (Whether when the item is created or modified later).
I converted the dd/mm/yyyy to the format yyyy-MM-dd in order to for the Delay Until to work, every entry made to the Date Effective From, no matter what time this has been entered, will pick up 12:00Z.
I don't need to add 1 day to the value as I need the flow to trigger on that specific day. e.g. if the day entered is 09/02/2021 I need this to trigger at midnight of the 8th into the 9th.
I might have cracked it! I am just testing it so see the outcome!
I have change the Format Date code to 00:00:00Z instead of hh:mm:ssZ:
formatDateTime(triggerOutputs()?['body/Date_x0020_Effective_x0020_From'],'yyyy-MM-ddT00:00:00Z')
So glad that you have solved the problem yourself!
You can accept it as an solution for other members to find it more quickly.
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
64 | |
27 | |
22 | |
15 | |
15 |
User | Count |
---|---|
123 | |
46 | |
43 | |
35 | |
31 |