Date.AddDays is a function in the Power Query M language that adds a specified number of days to a date or datetime value. The resulting value is returned as a date, datetime, or datetimezone.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Date.AddDays(
dateTime as any,
numberOfDays as number,
) as any
Description
Returns the date
, datetime
, or datetimezone
result from adding numberOfDays
days to the datetime
value dateTime
.
dateTime
: Thedate
,datetime
, ordatetimezone
value to which days are being added.numberOfDays
: The number of days to add.
Examples
Add 5 days to the date
, datetime
, or datetimezone
value representing the date 5/14/2011.
// Output: #date( 2011, 5, 19 )
Date.AddDays( #date( 2011, 5, 14 ), 5 )
Related articles
Learn more about Date.AddDays in the following articles:
- Create ISO Week and ISO Year in Power Query M (ISO 8601)
Learn how to create ISO Week and Year numbers in Power Query for consistent weeks and fiscal calendars. Step-by-step tutorial included! » Read more - Return Next Working Day in Power Query
Do you want to return the next working day in Power Query? There is no build in M-function for this, but this post shows how to create one yourself! » Read more
Related functions
Other functions related to Date.AddDays are:
