The last & the first day of a month in Google Sheets

32,852

Solution 1

If you had your base date in A1,
this will return the date of the last day of the previous month:

=eomonth(A1,-1)

For the date of the first day of the previous month, this is the shortest way:

=eomonth(A1,-2)+1

Also possible:

=date(year(A1),month(A1)-1,1)

Solution 2

for the last day of the previous month (international)

=eomonth(now();-1)

for the last day of the previous month (USA)

 =eomonth(now(),-1)

for the first day of the previous month (international)

=eomonth(now();-2)+1

for the first day of the previous month (USA)

    =eomonth(now(),-2)+1

Demo:

enter image description here

Share:
32,852
mike1789
Author by

mike1789

Updated on July 09, 2022

Comments

  • mike1789
    mike1789 almost 2 years

    How to get the first and last day of the previous month in Google Sheets?