VBA Day Function
Day Description
Returns the day of the month (a number from 1 to 31) given a date value.
Simple Day Examples
Here is a simple Day example:
Sub Day_Example()
MsgBox Day(#8/15/2019#)
End Sub
This will return 15.
Day Syntax
In the VBA Editor, you can type “Day(” to see the syntax for the Day Function:
The Day function contains an argument:
Date: A valid date.
Examples of Excel VBA Day Function
MsgBox Day(#10/12/2019#)
Result: 12
MsgBox Day("7/15/2019")
Result: 15
MsgBox Day(Date)
Result will be the day of the current system date.