March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'm trying to get to January 31st of the current year.
Im using this formula to get to the end of last year
Date.EndOfYear(Date.AddYears(DateTime.Date(DateTime.LocalNow()),-1)
How would I add on the additional 31 days?
Solved! Go to Solution.
@thegusman , Try like
Date.AddMonths( Date.AddYears(Date.EndOfYear(DateTime.Date(DateTime.LocalNow())),-1),1)
Other thought..? If you are looking for exactly the end of January each year (and January always has 31 days, and it's not a leap year factor), why not just hard code the Day and Month, then you only have to calcualte the year?
= #date(Date.Year(DateTime.LocalNow()),1,31)
Proud to give back to the community!
Thank You!
@thegusman , Try like
Date.AddMonths( Date.AddYears(Date.EndOfYear(DateTime.Date(DateTime.LocalNow())),-1),1)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
105 | |
98 | |
65 | |
54 |