cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Loeloe
Level: Powered On

expiry date should equal: minus 30 days formula (todaysdate - 30 days?

Good day,

 

i have a List with and Expiry Date Column and i need a Notification email to be sent 30 days prior the Expiry date.

 

What should the formula look like? @equals(substring(item()?['Expiry Date'], 0, 10), utcnow('yyyy-MM-dd'))

 

Where should the minus 30 days be added?

 

many thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: expiry date should equal: minus 30 days formula (todaysdate - 30 days?

Hi @Loeloe,

 

The formula that you provide above could not be able to achieve your needs. 

Please take a try with the following formula:

 

@equals(formatDateTime(utcNow(), 'MM/dd/yyyy'), formatDateTime(addDays(item()?['Expiry_x0020_Date'], -30), 'MM/dd/yyyy'))

 

 

More details about the usage of formatDateTime() function and addDays() function, please read the article as below:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Community Support Team
Community Support Team

Re: expiry date should equal: minus 30 days formula (todaysdate - 30 days?

Hi @Loeloe,

 

The formula that you provide above could not be able to achieve your needs. 

Please take a try with the following formula:

 

@equals(formatDateTime(utcNow(), 'MM/dd/yyyy'), formatDateTime(addDays(item()?['Expiry_x0020_Date'], -30), 'MM/dd/yyyy'))

 

 

More details about the usage of formatDateTime() function and addDays() function, please read the article as below:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
421
Level: Powered On

Re: expiry date should equal: minus 30 days formula (todaysdate - 30 days?

Hello @v-xida-msft ,

May you please help me with something similar? I'm new to flow and I have a SP list with column for date 'Due Date'. I want to send the notification with flow to the person in charge 3 days before the 'Due Date'. I could get the recipients e-mails from other column in the list - 'AssignedTo', no problem with that. I begin the flow with recurrence(I will set it to run one time a day), than I want to use the 'Filter query' in Get items, but I'm not exactly sure how could I achieve the right filter with adddays.

 

I will be very grateful, if you could help me with that. 

 

Kind Regards

 

421
Level: Powered On

Re: expiry date should equal: minus 30 days formula (todaysdate - 30 days?

Hello @v-xida-msft ,

 

I managed to do the job, please don't take my questions in consideration. 

 

Kind Regards

Boyan

Share-and-Flow
Level: Power Up

Re: expiry date should equal: minus 30 days formula (todaysdate - 30 days?

hi @421 

I am here looking for a similar solution.

My reminders will be sent 60,30 and 15 days before expiry date.

How did you do it?

 

Thanks

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 173 members 5,171 guests
Please welcome our newest community members: