cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (75,007)