Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am looking for a solution that would give me the beginning and ending dates of the previous month based on the current date.
Any help is greatly appreciated.
Thanks! [:D]
MonthStart(AddMonths(Today(), -1))
MonthEnd(AddMonths(Today(), -1))
This should work for any date. For example, on 10/31/2010, AddMonths(Today(), -1) would return 9/30/2010. In other words, the AddMonths(Date, -1) shouldn't return an invalid date.
MonthStart(AddMonths(Today(), -1))
MonthEnd(AddMonths(Today(), -1))
This should work for any date. For example, on 10/31/2010, AddMonths(Today(), -1) would return 9/30/2010. In other words, the AddMonths(Date, -1) shouldn't return an invalid date.
You can also take advantage of the offset parameter found in many date functions to simplify the formula to
MonthStart(Today(), -1)
MonthEnd(Today(), -1)
Regards.
Worked like a charm!
Thanks, Miller!