cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
annabelh12345
New Member

Expression for date that includes Month, Date, and Year

Hi Everyone,

 

I am currently building out a recurrence flow to scan my SharePoint List, and send an email when the End Date equals today's date. I have gotten this flow to work when I specify month and day, but when I incorporate year, the flow does not recognize the dates in my SharePoint list.

 

The flow will say it ran successful, but when I have a date in the SharePoint list that is today's date, it does not recognize it.

 

Here is the flow, and my current expression which works for Month and Day.

 

End Date Help.PNGEnd Date Help 2.PNG

Functions I have tried that were unsuccessful:

  • formatDateTime(utcNow( ),'YYYY-MM-dd')
  • formatDateTime(utcNow( ),'MM-dd-YYYY')

 

Any help is appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @annabelh12345 

 

Use the expression formatDateTime() for both end of the conditions (EndDate and UTCNow). Also try yyyy-MM-dd format.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

5 REPLIES 5
abm
Super User
Super User

Hi @annabelh12345 

 

Use the expression formatDateTime() for both end of the conditions (EndDate and UTCNow). Also try yyyy-MM-dd format.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Also you can change the condition to Equals



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Thank you for the response! Could I ask for clarification on what you mean by using formatDateTime() for both ends of the condition? Possibly with an example.

 

I am fairly new to expressions.

Hi @annabelh12345 

 

Thanks for your reply. Please see below

 

image.png

 

So left hand side map the SharePoint Date column with formatDate() expression and on right hand side UTCNow() with formatDateTime() expression. Hope it make sense.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi, this response solved my problem. I appreciate your help. yyyy-MM-dd fixed my problem.

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,341)