Return to VBA Code Examples

VBA Day Function

Day Description

Returns the day of the month (a number from 1 to 31) given a date value.

Simple Day Examples

Here is a simple Day example:

This will return 15.

Day Syntax

In the VBA Editor, you can type  “Day(” to see the syntax for the Day Function:

The Day function contains an argument:

Date: A valid date.

Examples of Excel VBA Day Function

Result: 12

Result: 15

Result will be the day of the current system date.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as

Learn More!