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

Change Today Date expression to Yesterdays Date

Hello,

 

I have a flow designed that emails a report everyday at 7PM with a daily report with an excel file. The email states the date of the report which is suppose to be the same date that the email is sent, since it is a end of day report. 

 

My problem is that when it sends the email at 7PM it outputs the following days date on the email. For example

 

It send an email on 11/25/2019 @7:00PM and the body of the email says "End of day report 11/26/2019"(its needs to say the 25th)

 

This is the current expression i have in the compose function: 

formatDateTime(utcNow(),'MM/dd/yyyy')
 
How should I modify it?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
CollabTechie Responsive Resident
Responsive Resident

Re: Change Today Date expression to Yesterdays Date

Hi @kpiana ,

Try the below instead

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

 
----------------------------------------------------------------------------------------------------------
If my reply was helpful consider giving a THUMBS UP or if it solved your issue, please ACCEPT SOLUTION so others can find it.

View solution in original post

1 REPLY 1
CollabTechie Responsive Resident
Responsive Resident

Re: Change Today Date expression to Yesterdays Date

Hi @kpiana ,

Try the below instead

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

 
----------------------------------------------------------------------------------------------------------
If my reply was helpful consider giving a THUMBS UP or if it solved your issue, please ACCEPT SOLUTION so others can find it.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,842)