Power Automate Subtract Days From Date: 3 Functions Tested

To do a Power Automate subtract days from date, pass a negative number to addDays(). This returns the date seven days earlier:

addDays('2026-11-10',-7,'yyyy-MM-dd')

In my test run it returned 2026-11-03. There’s no subtractDays() function, so a negative number is the whole trick.

In this tutorial, I’ll show you three ways to Power Automate subtract days from date, how to do it for every row in a SharePoint list, and one sign mistake that silently moves your date forward.

Power Automate Compose code view with addDays minus 7 expression
Code view of the Compose action: addDays() with -7

What Is the Syntax for Subtracting Days?

addDays() takes three arguments: the date, the number of days, and an optional format.

addDays('<timestamp>', <days>, '<format>')

Microsoft documents the days argument as a positive or negative integer. Use a format such as 'yyyy-MM-dd' unless you want a full timestamp.

Without a format, my run returned 2026-11-03T00:00:00.0000000. Format strings work the same as in formatDateTime().

To try any expression below, add a Compose action, click Inputs, type /, choose Insert expression, paste it, and select Add.

Three Functions That Subtract Days

All three returned the same date in my run on November 9, 2026, at 7:24 PM Eastern:

ExpressionResult
addDays('2026-11-10',-7,'yyyy-MM-dd')2026-11-03
subtractFromTime('2026-11-10',7,'Day','yyyy-MM-dd')2026-11-03
getPastTime(7,'Day','yyyy-MM-dd')2026-11-03

getPastTime() always starts from the current UTC time, so it only fits “N days ago from now.” At 7:24 PM Eastern, UTC was already November 10, which is why it matched.

subtractFromTime() also takes Hour, Week, Month, and Year. Two weeks back returned 2026-10-27. For months, see adding months to a date.

Why Did subtractFromTime Move My Date Forward?

Because it already subtracts. Give it a negative number and it adds instead. This expression looks like “minus seven”:

subtractFromTime('2026-11-10',-7,'Day','yyyy-MM-dd')
Power Automate code view of subtractFromTime with a negative interval
The trap: a negative interval inside subtractFromTime()

It returned 2026-11-17, seven days later:

Power Automate run output 2026-11-17 for subtractFromTime with -7
The run output shows November 17, not November 3

Pick one rule and stick to it. I use addDays() with a negative number everywhere, the same function I use to add days to a date.

Subtract Days From Today in Eastern Time

Convert first, then subtract. This gave me the date 30 days before today in New York:

addDays(convertFromUtc(utcNow(),'Eastern Standard Time'),-30,'yyyy-MM-dd')

It returned 2026-10-10. For one day back, there’s a full guide on getting yesterday’s date.

Subtract Days From a SharePoint Date Column

My Customer Requests list has a date-only DueDate column, and rows 2 and 5 are blank:

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
8Network switch swap – Atlanta office11/08/2026
9Desk phones – Phoenix call center11/10/2026
10Safety signage – Miami warehouse11/16/2026
11Projector bulbs – Portland office11/12/2026

To get a reminder date three days before each due date, add a Select after Get items and map a Reminder key to this expression:

if(empty(item()?['DueDate']),null,addDays(item()?['DueDate'],-3,'yyyy-MM-dd'))
Power Automate Select output with Reminder dates three days before each due date
Each Reminder is three days before its DueDate, and blank dates stay null

Row 1 (10/15/2026) returned 2026-10-12, row 4 (10/09/2026) returned 2026-10-06, and blanks returned null. The guard comes from checking if a date field is empty.

Get Items From the Last 30 Days

Subtract days inside a Get items Filter Query to pull a date range from SharePoint. Today_Eastern is a Compose action holding today’s Eastern date:

DueDate ge '@{addDays(outputs('Today_Eastern'),-30,'yyyy-MM-dd')}' and DueDate lt '@{outputs('Today_Eastern')}'
Power Automate Get items filter query DueDate ge 30 days ago and lt today
The filter as it ran: October 10 up to November 9

It returned rows 1, 3, 6, and 8:

Power Automate Select output of IDs 1 3 6 8 from a last 30 days filter
Row 4, due October 9, is one day outside the window

More filter syntax is in the Get items filter query guide.

More Subtract Days Examples

ExpressionResult
addDays('2026-03-03',-5,'yyyy-MM-dd')2026-02-26
addDays('2026-01-02',-3,'yyyy-MM-dd')2025-12-30
addDays('2026-11-10T15:30:00Z',-1)2026-11-09T15:30:00.0000000Z
addDays('11/10/2026',-7,'MM/dd/yyyy')11/03/2026
addDays('2026-11-10',int('-7'),'yyyy-MM-dd')2026-11-03
addDays('2026-11-10',mul(int('5'),-1),'yyyy-MM-dd')2026-11-05
subtractFromTime('2026-11-10',6,'Hour')2026-11-09T18:00:00.0000000

Month and year boundaries are handled for you. The time of day is kept, so add a format when you only want the date.

Common Errors

A blank date breaks addDays(). addDays(null,-7) failed with InvalidTemplate:

Power Automate InvalidTemplate error for addDays with a null date
addDays() on a null value fails the action
The template language function 'addDays' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'.

The days value must be an integer too. A number stored as text, such as '-7', fails, so wrap it in int().

Frequently Asked Questions

How do I subtract days from a date in Power Automate?

Use addDays(date,-N,'yyyy-MM-dd'). For example, addDays('2026-11-10',-7,'yyyy-MM-dd') returns 2026-11-03.

Is there a subtractDays function in Power Automate?

No. Use addDays() with a negative number, subtractFromTime() with a positive number, or getPastTime() for days before now. See the Microsoft expression functions reference.

Why does subtractFromTime with -7 add days?

subtractFromTime() already subtracts, so a negative interval cancels out. It returned 2026-11-17 for November 10.

How do I subtract days from today’s date?

Use addDays(utcNow(),-N,'yyyy-MM-dd'), or convert to your time zone first with convertFromUtc().

Can I subtract days from a blank SharePoint date?

No. A blank date is null and addDays() fails. Wrap it in if(empty(date), null, addDays(...)).

Keep Learning Date Expressions

Subtracting days usually leads to one of these next: