Note: The other languages of the website are Google-translated. Back to English
English English

Excel Formula: Get First Day or Last Day of Month from A Date

doc convert date to julia 1

In this tutorial, it provides formulas to return the first day or last day of month from the given date in Excel.

If you want to follow along with this tutorial, please download the example spreadsheet.
doc convert date to julia 1

Get first day of month from a date

 

Generic formula:

date-DAY(date)+1

Syntaxt and Arguments

Date: the date that is used to find the first day of month.

Return Value

It returns the first day of the current month in date format.

How this formula works

Use below formula to get the first day of month from the date in cell B3:

=B3-DAY(B3)+1

Press Enter key to get the result.
doc convert date to julia 1

Explanation

DAY function: returns the day from the given date as number.

Since the date is stored as number in Excel, 2/12/2019 is stored as 43508 in Excel.

=B3-DAY(B3)+1
=43508-DAY(2/12/2019)+1
=43508-12+1
=43496+1
=43497 which is shown as date 2/1/2019

Get last day of month from a date

 

Generic Formula

EOMONTH(date,0)

Syntax and Arguments

Date: the date that is used to find the last day of month.

Return Value

It returns the last day of current month in number format.

How the formula works

Use below formula to get the last day of month from the date in cell B3:

=EOMONTH(B3,0)

Press Enter key to get the result. The result displays as a 5-digit number.

doc convert date to julia 1

Keep the formula result selected, and press Ctrl + 1 to display the Format Cells dialog, then under Number tab, click Date from the Category list, choose the date type you want to display in the Type section.
doc convert date to julia 1

Click OK, the result is shown as date.
doc convert date to julia 1

Explanation

EOMONTH function: gets the last day of month n months in future or past.


Relative Formulas

Relative Functions


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations