# Function for Last Day of Previous Month



## TDC21 (Aug 7, 2017)

I am trying to create some monthly reports that are ran with an as of date for the previous month end.  Is there a function to retrieve the last day of last month.


----------



## TDC21 (Aug 7, 2017)

Looking for a function to work in Power Query, forgot to add that


----------



## TDC21 (Aug 7, 2017)

Trial and error prevails,

= Date.EndOfMonth(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1))


----------

