Day Function

Returns a Variant (Integer) specifying a whole number between 1 and 31, inclusive, representing the day of the month.

Syntax

Day( date )

The required dateargument is any Variant, numeric expression, string expression, or any combination of these that can represent a date. If date contains Null, Null is returned.

Note   If the Calendar property setting is Gregorian, the returned integer represents the Gregorian day of the month for the date argument. If the calendar is Hijri, the returned integer represents the Hijri day of the month for the date argument.

Example

Note   Examples that follow demonstrate the use of this function in a Visual Basic for Applications (VBA) module. For more information about working with VBA, select Developer Reference in the drop-down list next to Search and enter one or more terms in the search box.

This example uses the Day function to obtain the day of the month from a specified date. In the development environment, the date literal is displayed in short format using the locale settings of your code.

Dim MyDate, MyDay
MyDate = #February 12, 1969# ' Assign a date.
MyDay = Day(MyDate) ' MyDay contains 12.

Applies To: Access 2013, Access 2007, Access 2010, Access 2007 Developer, Access 2010 Developer, Access 2013 Developer



Was this information helpful?

Yes No

How can we improve it?

255 characters remaining

To protect your privacy, please do not include contact information in your feedback. Review our privacy policy.

Thank you for your feedback!

Support resources

Change language