|
Be the first user to complete this post
|
Add to List |
VBA-Excel: Date-Time Functions – Day()
Description:
The Day function takes date as a parameter and returns a number between 1 and 31, that is the day of the month.
Format:
Day(strDate)
Arguments:
- strDate
- Mandatory
- Type: Date
- Date, whose day needs to be calculated.
Example:
Function FnDay()
Dim strDate
strDate = CDate("15-July-2013")
MsgBox "Day of " & strDate & " is -> " & Day(strDate)
End Function

Also Read:
- VBA Excel – Refer to Multiple Ranges : Union Method
- VBA-Excel: Date-Time Functions – Hour(), Minute(), Second()
- VBA-Excel: Date-Time Functions – DatePart()
- VBA-Excel: Date-Time Functions – DateAdd()
- VBA-Excel: Get all the WeekDays or Working days in Specified Date Range, (excluding Satudays and Sundays)