Date format [Solved/Closed]

Report
-
 deakin1980 -
Hello,

i am trying to create a report which will show me the first date and last date of the previous month. I need first date in one field and second in another.

Is there a formula i can use for this?

Thanks

3 replies

Posts
9112
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
December 13, 2019
2
If your date is in A,
First day of the previous month: =DATE(YEAR(A1);MONTH(A1)-1;1)
Last day of the previous month: =A1-DAY(A1)
If your reference day is now,
First day of the previous month: =DATE(YEAR(TODAY());MONTH(TODAY())-1;1)
Last day of the previous month: =TODAY()-DAY(TODAY())
Your a star exactly what I was looking for. Finally can complete my macro :)