The VBA Day function returns an integer corresponding to the day of the specified date.
Day(date)
Using the Day function to get the relevant information from a date:
Sub DayExample1() myDate = #10/30/2020# MsgBox Day(myDate) 'Returns: 30 end sub
This function also accepts dates in text format:
Sub DayExample2() myDate = "30/10/2020" MsgBox Day(myDate) 'Returns: 30 end sub