Power Automate Get Yesterday Date: 5 Tested Expressions

For a Power Automate get yesterday date step, use addDays() with -1 on utcNow(), plus a format string to drop the time. Here’s the shortest version that works:

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

On November 9, 2026, it returned 2026-11-08. In this tutorial, I’ll show you the variations for Power Automate get yesterday date that I ran in a real flow, including the time zone trap.

Power Automate Compose code view with addDays utcNow minus one in yyyy-MM-dd format
The Compose action behind every result in this post

What Are the Ways to Get Yesterday’s Date?

You’ve got three functions that do the same job. They all returned the same date in my run, so pick the one that reads best to you:

ExpressionResult
addDays(utcNow(),-1,'yyyy-MM-dd')2026-11-08
getPastTime(1,'Day','yyyy-MM-dd')2026-11-08
subtractFromTime(utcNow(),1,'Day','yyyy-MM-dd')2026-11-08

I use addDays() because it also moves dates forward. Here’s a full guide to the addDays() function.

To add one, insert a Compose action, click Inputs, type /, choose Insert expression, paste the expression, and select Add. Don’t type an @ there.

How Do You Format Yesterday’s Date?

Change the third argument. These are the exact outputs I got:

FormatOutput
none2026-11-08T18:54:40.6719904Z
'yyyy-MM-dd'2026-11-08
'MM/dd/yyyy'11/08/2026
'dddd, MMMM d, yyyy'Sunday, November 8, 2026

Format letters are case-sensitive. MM is month and mm is minutes. When I used uppercase year and day letters, the flow didn’t fail:

addDays(utcNow(),-1,'YYYY-MM-DD')
Power Automate output YYYY-11-DD from an uppercase date format string
Uppercase YYYY and DD came back as literal text: YYYY-11-DD

That’s the dangerous kind of mistake, because the run still shows Succeeded. More patterns are in my formatDateTime() guide.

How Do You Get Midnight Yesterday?

Wrap the result in startOfDay() when you need the start of that day, for example the beginning of a date range:

startOfDay(addDays(utcNow(),-1))

It returned 2026-11-08T00:00:00.0000000Z.

Why Is Yesterday’s Date Wrong in the Evening?

Because utcNow() uses UTC, which runs hours ahead of the US. At 9:30 PM Eastern on November 10, UTC is already November 11. Here’s the difference with a fixed timestamp:

addDays('2026-11-11T02:30:00Z',-1,'yyyy-MM-dd')

That returned 2026-11-10, which is today for someone in New York, not yesterday. Convert first:

addDays(convertFromUtc('2026-11-11T02:30:00Z','Eastern Standard Time'),-1,'yyyy-MM-dd')
Power Automate output 2026-11-09 after converting UTC to Eastern before addDays
Converting to Eastern first returned the right day: 2026-11-09

For a live flow, swap the fixed value for utcNow(). The name Eastern Standard Time also covers daylight saving time. If you store it, here’s how to keep today’s date in a variable.

Does addDays Handle Month and Year Boundaries?

Yes, you don’t need any special logic. I tested the three awkward cases:

InputYesterday
2026-03-012026-02-28
2026-01-012025-12-31
2028-03-01 (leap year)2028-02-29

How Do You Get the Previous Business Day?

On a Monday, “yesterday” usually means Friday. dayOfWeek() returns 1 for Monday, so go back three days then and one day otherwise:

if(equals(dayOfWeek(utcNow()),1),addDays(utcNow(),-3,'yyyy-MM-dd'),addDays(utcNow(),-1,'yyyy-MM-dd'))

With a Monday, November 9 test date, it returned 2026-11-06. With Wednesday, November 11, it returned 2026-11-10. This version doesn’t know about holidays.

If a flow should start only on working days, handle that up front with trigger conditions.

How Do You Find SharePoint Items Due Yesterday?

My test list, Customer Requests, has a date-only DueDate column, with row 8 due on November 8:

IDTitleDueDate
1Ergonomic chairs – Austin office10/15/2026
2Laptop refresh – Denver sales teamblank
3Conference room AV upgrade – Seattle10/20/2026
4Printer toner – NYC front desk10/09/2026
5Standing desks – Chicago officeblank
6Badge printer – Boston lobby10/21/2026
7Copier lease renewal – Dallas office11/09/2026 (today)
8Network switch swap – Atlanta office11/08/2026 (yesterday)
9Desk phones – Phoenix call center11/10/2026 (tomorrow)
10Safety signage – Miami warehouse11/16/2026

This looked right, but it returned nothing:

DueDate eq '@{addDays(utcNow(),-1,'yyyy-MM-dd')}'

Use a one-day range instead. In Get items, open Advanced parameters, show Filter Query, and enter:

DueDate ge '@{addDays(outputs('Today_Eastern'),-1,'yyyy-MM-dd')}' and DueDate lt '@{outputs('Today_Eastern')}'
Power Automate Get items filter query range for items due yesterday in code view
GI is my shorthand for Get items. The filter runs from yesterday up to, but not including, today

Today_Eastern is a Compose action holding convertFromUtc(utcNow(),'Eastern Standard Time','yyyy-MM-dd'). That query returned row 8 only:

Power Automate output showing row ID 8 for items due yesterday
The range filter found row 8

For more query patterns, see the Get items filter query guide.

How Do You Build This Flow Step by Step?

If you’re starting from an empty flow, here’s the order I’d follow. It takes about five minutes:

  1. Go to Create, choose Instant cloud flow, pick Manually trigger a flow, and select Create.
  2. Add a Compose action and rename it Today Eastern. Spaces in the name become underscores in expressions.
  3. In Inputs, type /, choose Insert expression, and paste convertFromUtc(utcNow(),'Eastern Standard Time','yyyy-MM-dd').
  4. Add a second Compose action named Yesterday, and use addDays(outputs('Today_Eastern'),-1,'yyyy-MM-dd').
  5. Add Get items with the range filter from the previous section.
  6. Save, then select Test, Manually, and Run flow.

Open each action in the run history to read its value. In my run, Today Eastern showed 2026-11-09, and Get items returned one row.

Cheat Sheet for Yesterday’s Date

Swap utcNow() for your own date if you need yesterday relative to something else. Every line here matches my test run:

NeedExpression
Yesterday, date onlyaddDays(utcNow(),-1,'yyyy-MM-dd')
Yesterday, US formataddDays(utcNow(),-1,'MM/dd/yyyy')
Yesterday’s weekday nameaddDays(utcNow(),-1,'dddd')
Start of yesterdaystartOfDay(addDays(utcNow(),-1))
Yesterday in Eastern timeaddDays(convertFromUtc(utcNow(),'Eastern Standard Time'),-1,'yyyy-MM-dd')
Yesterday from now onlygetPastTime(1,'Day','yyyy-MM-dd')

I keep the format in the expression instead of a later step. That way, every action after it sees the same plain text value, and nobody has to guess whether a time is hiding inside it.

What Errors Should You Expect?

The most common one is passing the day count as text. addDays(utcNow(),'-1') failed with this message:

The template language function 'addDays' expects its second parameter to be an integer. The provided value is of type 'String'.

If the number comes from a text field, run it through int() first. Here’s how to convert text to an integer safely.

Frequently Asked Questions

How do I get yesterday’s date in Power Automate?

Use addDays(utcNow(),-1,'yyyy-MM-dd'). It returns yesterday as date-only text in UTC.

What is the difference between addDays and getPastTime?

addDays() works on any timestamp you give it. getPastTime() always starts from now. Both are in the expression functions reference.

How do I get yesterday in Eastern time?

Use addDays(convertFromUtc(utcNow(),'Eastern Standard Time'),-1,'yyyy-MM-dd').

Why does my SharePoint filter for yesterday return nothing?

eq with a date-only value returned no rows in my test. A ge and lt range found the right row.

Can I get the same day last week?

Yes. Change the number to -7, as in addDays(utcNow(),-7,'yyyy-MM-dd').

More Power Automate Tutorials

Once you’ve got the date, these usually come next in the same flow: