Excel.Tips.Net ExcelTips (Menu Interface)

Determining the Day of the Month

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Determining the Day of the Month.

When creating macros in VBA, you may have a need to know the specific day of the month represented by a particular date. For instance, you may want to determine the day of the month on which the macro is being executed. The following code will do the trick:

iDay = Day(Date)

The Day function returns an integer value representing the day of the month of whatever date you provide. In this example, the Date function represents today's date, and so Day returns today's day of the month.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2502) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Determining the Day of the Month.

Related Tips:

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

Barry    30 May 2014, 09:39
@ Micky, Sorry I still disagree.

Just to wrap this up in case to ensure other readers aren't mislead.

Using Today() or Now() leaves the underlying value as a date serial number e,g, using Now()today (30th May2014) would give a value of 41789, this can be displayed as 30 by using the cell formatting but should you for whatever reason multiply this by, say, 2 you will get a totally different from using the Day(Now()) formula and performing the same calculation.

Michael (Micky) Avidan    29 May 2014, 15:40
Disagreeing is good but not good enough.
The tip was refering to (quote): "returning an integer(!) value representing the day of the month of whatever date you provide" (end of quote).
There is no difference between NOW() and TODAY() as far as returning the day of the provided date.
I rest my case.

Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2014)
Barry    29 May 2014, 13:14
Of course if you do just want a numeric value on a worksheet then the formula:


is by far the easiest solution.
Barry    25 May 2014, 12:11
@ Micky,

For once, I have to disagree with your second sentence; setting the display format doesn't change the underlying value which will be the full date serial number and therefore performing any mathematical function on this expecting it to be just the day of the month with give an incorrect result.

You're correct in you're third sentence assuming the User wants a value rather than text. If the User wants a value then using the VALUE function on the result will convert the text to a number.
Michael (Micky) Avidan    24 May 2014, 15:22
Ignore the first sentence, in my post, regarding the helper-column.
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2014)
Michael (Micky) Avidan    24 May 2014, 11:53
To my opinion it is a waste to use an Helper column.
The same can be achieved by putting: =NOW() in the cell and format it with one of the day formats.
(dd / ddd / dddd)
In addition - the result of your suggestion is Pure Text and as such no calculations can be perfomed on it.
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2014)

Barry    24 May 2014, 05:06
If you only want this on a worksheet then you can use the formula:


using "dd" will include a leading zero for days 1-9;
      "ddd" will give a short day name e.g. Mon
      "dddd" will give the full day name e.g. Monday

The same is true for months just substitute "m" for "d"

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2017 Sharon Parq Associates, Inc.