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

Use Today date parameter

I would like to have a condition in my Flow that upon a creation of a new item, checks to see if a date field in SharePoint online is equal to today's date, if so perform an action.  Is this possible to do?  I don't see an option to do this.

7 REPLIES 7
PowerApps Staff Samuel
PowerApps Staff

Re: Use Today date parameter

This is achievable if you create a condition and flip it to advanced mode. In the advanced mode, you can use the same expression syntax that Logic Apps uses. Expression reference is here: https://msdn.microsoft.com/en-us/library/azure/mt643789.aspx

 

From there, you may have to get a bit crafty. It looks like the dates that come back for sharepoint items are in this format: 2016-05-06T21:43:02Z

 

So, start by using the editor to do a basic comparison with the timestamp field, then switch to the advanced view. This will tell you how to reference the field you care about in the expression. I chose to use the 'Created' time when testing this.

 

Then, to do the actual comparison, we can trim just the date part from the timestamp, and compare it against a custom-formatted utcnow expression. So putting this into the advanced condition did the trick for me: @equals(substring(triggerBody()['Created'], 0, 10),utcnow('yyyy-MM-dd'))

Re: Use Today date parameter

This worked for me! But now I get all users from salesforce with today's date as close oppr. date now I can not send an email to those users, it gives array error. I want to send email to these users via flow.

Anonymous
Not applicable

Re: Use Today date parameter

Does this really mean: there is nothing such as a today() function letting me compare a field date easily, without having to care about calendar date display settings?

I would like to have one of the easiest thinkable flows: a notification triggered by a date property out of a sharepoint list. Isn't that possible?

DMoonSoC
Level: Powered On

Re: Use Today date parameter

Hi Samuel,

 

I'm trying to achieve a similar flow where an email is triggered when a date is matched on a SharePoint list item. I've tried to follow your instructions below but get lost around the (substring(triggerBody)) part. I haven't been using flow for long but would you mind giving some further instructions on how to set up what you've desribed below?

 

thanks,

 

Loeloe
Level: Powered On

Re: Use Today date parameter

Good day,

 

Thanks for this - it worked.

 

Take note: your Column Name should not contain a space (ex. reminder date) it should have no spaces ex. ReminderDate.

 

many thanks again

 

Charmaine

Anonymous
Not applicable

Re: Use Today date parameter

I am very new to flows. I cannot get this function to work for me. Any help would be appreciated! 

Loeloe
Level: Powered On

Re: Use Today date parameter

good day,

 

This is what i used to get the date as todays date 

 

todaysdate.png

 

and i used this original description

 

https://www.youtube.com/watch?v=-klsQ4LrG6E

 

hope this helps

 

regards

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,528)