Forum Discussion
M language
- 1 year ago
= Date.FromText( Text.From( Date.Year(Date.AddYears( Date.From(DateTime.LocalNow()),1))) & "-12-31")
- 1 year ago
You can add year to specific date by Date.AddYear and also calculate the last date of a year by Date. EndOfYear.
So your dates can be achieved by the below formual.
Today date => Date.from(DateRime.LocalNow())
Date of next three year=> Date.AddYear(Date.from(DateRime.LocalNow()),3)
End of next year => Date.EndOfYear(Date.AddYear(Date.From(DateTime.LocalNow()),1))
You can add year to specific date by Date.AddYear and also calculate the last date of a year by Date. EndOfYear.
So your dates can be achieved by the below formual.
Today date => Date.from(DateRime.LocalNow())
Date of next three year=> Date.AddYear(Date.from(DateRime.LocalNow()),3)
End of next year => Date.EndOfYear(Date.AddYear(Date.From(DateTime.LocalNow()),1))
THank you. I was asking three year backwards. Is it supposed to be:
Date of next three year=> Date.AddYear(Date.from(DateRime.LocalNow()),-3)