Usage of Add Days in Power Automate
Usage of Add Days in Power Automate
Date calculations are a common requirement in Power Automate workflows. Whether you need to calculate due dates, reminder dates, expiration dates, or follow-up schedules, the addDays() function provides a simple and efficient solution.
The addDays() expression allows you to add or subtract a specific number of days from a given date and return the updated value.
What is addDays()?
The addDays() function adds a specified number of days to a date value.
addDays( utcNow(), 7 )
The above expression returns a date that is 7 days ahead of the current date.
Add Days to a Date
You can use positive numbers to move forward in time.
addDays( '2025-01-01', 30 )
Output:
2025-01-31Subtract Days from a Date
Use negative numbers to move backward in time.
addDays( utcNow(), -15 )
This returns a date that is 15 days before today.
Format the Output Date
You can combine addDays() with formatDateTime() for custom output formats.
formatDateTime( addDays( utcNow(), 10 ), 'dd/MM/yyyy' )
Example Output:
25/12/2025 Important: Positive values add days, while negative values subtract days. The function works with UTC dates and custom date values.Common Use Cases
- Due date calculations
- Reminder notifications
- Contract expiration tracking
- Follow-up scheduling
- Approval deadlines
- Project milestone planning
Best Practices
- Store dates in UTC when possible.
- Use formatDateTime() for user-friendly display.
- Test date calculations across month boundaries.
- Consider timezone requirements.
- Document business date logic.
Key Takeaways
- addDays() adds days to a date value.
- Negative values can be used to subtract days.
- Works seamlessly with utcNow().
- Can be combined with formatDateTime().
- Ideal for scheduling, reminders, and date calculations.