Day(date) returns a Variant/Integer between 1 and 31, inclusive, representing the day of the month for date : Day « Date Functions « VBA / Excel / Access / Word






Day(date) returns a Variant/Integer between 1 and 31, inclusive, representing the day of the month for date

 
Sub dateDemo5()
   If Day(Date) = 1 And Month(Date) = 1 Then MsgBox "Happy new year!"
End Sub

 

Related examples in the same category

1.Day(Date)