cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pure96
Frequent Visitor

Countdown Timer from Date Column

Hello!

 

I have a flow that produces a 30 day reminder email based on a calculated column in a MS List. In that email it says "...this item will be past due in 30 days". I want to know if there is a way to pull the date from the renewal date column on the list (last day before the item needs to be renewed) and subtract the current day and put that in the email so it will be like a countdown timer.

 

For example if the renewal date is 07/31/22 and today's date is 07/14/22, the email should automatically say "...this item will be past due in 17 days" and keep going down until it reaches 07/31/22.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @pure96,

Do you want to create a recurrence flow to remind everyday until the due date?

Could you please tell me more about your scneairo?

 

Here is a simple demo, please check as below.

vqiaqimsft_0-1656319792200.png

formatDateTime(items('Apply_to_each')?['RenewalDate'],'yyyy-MM-dd')
formatDateTime(utcNow(),'yyyy-MM-dd')
div(sub(ticks(formatDateTime(items('Apply_to_each')?['RenewalDate'],'yyyy-MM-dd')),ticks(formatDateTime(utcNow(),'yyyy-MM-dd'))),864000000000)

You should make sure the the renewal date is greater than utcnow() and the date difference should be in 20 days, if it is, you should directly reference to the date difference from the div() function.

vqiaqimsft_1-1656319935685.png

 

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @pure96,

Do you want to create a recurrence flow to remind everyday until the due date?

Could you please tell me more about your scneairo?

 

Here is a simple demo, please check as below.

vqiaqimsft_0-1656319792200.png

formatDateTime(items('Apply_to_each')?['RenewalDate'],'yyyy-MM-dd')
formatDateTime(utcNow(),'yyyy-MM-dd')
div(sub(ticks(formatDateTime(items('Apply_to_each')?['RenewalDate'],'yyyy-MM-dd')),ticks(formatDateTime(utcNow(),'yyyy-MM-dd'))),864000000000)

You should make sure the the renewal date is greater than utcnow() and the date difference should be in 20 days, if it is, you should directly reference to the date difference from the div() function.

vqiaqimsft_1-1656319935685.png

 

 

Best Regards,
Qi

This worked! Thank you!

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.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,857)