cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Get today's date and if it matches ReviewDate send an email

Hello

 

I have a Flow that has a recurrence every day.

I'd like it to find TodaysDate and if it matches the ReviewDate column then send an email.

I'm in Australia so I believe have to convert the time.

 

I wondered if I could use 'Current time' action to get the date. But I don't know how to extract the date from that to just dd-MM-yyyy format and put  it into the TodaysDate column.

 

Once I get the date, then I can set a condition, if ReviewDate = TodaysDate send email.

 

Could someone help me please?
Thank you

Mel

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Get today's date and if it matches ReviewDate send an email

 

Hi @xxxxmints ,

 

Try to use yyyy-MM-dd.

 

And you could check the date format of ReviewDate in the body of Get items action without configuring Filter Query.

 

Best Regards,

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

View solution in original post

7 REPLIES 7
Highlighted
Super User II
Super User II

Re: Get today's date and if it matches ReviewDate send an email

@xxxxmints 

 

Here is a blog post that can be helpful:

https://flow.microsoft.com/en-us/blog/working-with-dates-and-times/

 

Also, you can format today's date in dd-MM-yyyy format as below:

formatDateTime(utcNow(),'dd-MM-yyyy')

 

Regards

Krishna

If my reply helped you resolving the issue, please mark the reply as Accepted Solution.

Highlighted
Community Support
Community Support

Re: Get today's date and if it matches ReviewDate send an email

 

Hi @xxxxmints ,

 

As far as I know, the format of the custom date filed in the body of Get items action is yyyy-MM-dd.

You could refer to the following image to create flow.

65.PNG

Please note that you need to get the internal name of ReviewDate and configure it in Filter Query.

You could run Get items action without configuring Filter Query and get the internal name of the date field in the body of Get items action.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper III
Helper III

Re: Get today's date and if it matches ReviewDate send an email

Hi @v-bacao-msft 

Thank you for your reply.

Here is my flow.

Column Field=ReviewDate

The format I have for ReviewDate is:  formatDateTime(body('Current_time'),'dd-MM-yyyy')

(the column displays it as 14/05/2002 however - not sure if that has any relevance).

 

Unfortunately it comes up as an error: String was not recognized as a valid DateTime. Creating query failed.

 

2020-05-14 16_20_14-Window.png2020-05-14 16_30_04-Edit your flow _ Power Automate.png

Highlighted
Community Support
Community Support

Re: Get today's date and if it matches ReviewDate send an email

 

Hi @xxxxmints ,

 

Try to use yyyy-MM-dd.

 

And you could check the date format of ReviewDate in the body of Get items action without configuring Filter Query.

 

Best Regards,

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

View solution in original post

Highlighted
Helper III
Helper III

Re: Get today's date and if it matches ReviewDate send an email

Hi there

I switched it around. And that works.

Thanks. Much appreciated.

Highlighted
Helper III
Helper III

Re: Get today's date and if it matches ReviewDate send an email

Hi 

Still testing. It seems to work when I test, but not if I set the date for, say, tomorrow. 

I will get back to you.

 



 
Highlighted
Helper III
Helper III

Re: Get today's date and if it matches ReviewDate send an email

Ok, this is the issue.

 

The filter query: ReviewDate eq 'formatDateTime(body('Current_time'),'yyyy-MM-dd')'

is looking for a date in that format in the ReviewDate column.

In Australia, we have the format dd/MM/yyyy so it's not picking it up.

 

If I change the query to ReviewDate eq 'formatDateTime(body('Current_time'),'dd/MM/yyyy')

it doesn't work.

 

How can I set the query so that it is using the correct date format for us?
Thank you.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,561)