The Mont function in VBA returns the month number for the specified date.

Syntax

Parameter

Time (required) – This parameter represents the date.

Return

This function returns the month number for the specified date.

Example 1

Output

1

VBA Month Function

Example 2

Output

02

VBA Month Function

Example 3

Output

VBA Month Function

Pin It on Pinterest

Share This