cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mtagliaferri
Resolver I
Resolver I

Delay Until

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')

Capture2.jpg

 

Capture3.JPG

 

Capture4.JPG

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mtagliaferri
Resolver I
Resolver I

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')

 

Capture1.jpgCapture2.JPG

View solution in original post

4 REPLIES 4
v-yiwenxie-msft
Microsoft
Microsoft

Hi @mtagliaferri 

 

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)

 

1.8-1.PNG

 

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.

 

mtagliaferri
Resolver I
Resolver I

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')

 

Capture1.jpgCapture2.JPG

v-yiwenxie-msft
Microsoft
Microsoft

 

Hi @mtagliaferri 

 

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.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,028)