Day Function |
No
Day(dateexpression)
dateexpression
Use: Required
Data Type: Any valid date expression
The path of the directory to set as the new default directory.
Variant of subtype Integer.
Returns a variant integer data subtype that can take on a value ranging from 1 to 31, representing the day of the month of dateexpression. dateexpression, the argument passed to the Day function, must be a valid date/time or time value.
dateexpression can be any variant, numeric expression, or string expression that represents a valid date.
If dateexpression is Null, Null is returned.
Debug.Print Day(Now)
When working with dates, always check that a date is valid using the IsDate function prior to passing it as a function parameter.
If dateexpression omits the year, Day still returns a valid day.
If the day portion of dateexpression is outside its valid range, the function generates runtime error 13, "Type mismatch." This is also true if the day and month portion of dateexpression is 2/29 for a nonleap year.
To return the day of the week, use the WeekDay function.
3.17.166.34