Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to use Date.AddDays and Data.AddMonths together

Hi,

 

I have a date column where I would like to add +1 month and -15 days in Power Query. I can't add +15 days only because we have months with 31 days.

 

I try to use Date.AddDays([Date], -15), but if possible I would like to use Date.AddMonths in the same function.

 

Example:

datenew date
16/08/202001/09/2020

 

It's possible?

 

Thanks!

  • Anonymous ,

     

    Try this one:

    Date.AddDays(Date.AddMonths([Column1], 1), -15)

2 Replies

  • camargos88's avatar
    camargos88
    Community Champion

    Anonymous ,

     

    Try this one:

    Date.AddDays(Date.AddMonths([Column1], 1), -15)