
- VBA Tutorial
- VBA - Home
- VBA - Overview
- VBA - Excel Macros
- VBA - Excel Terms
- VBA - Macro Comments
- VBA - Message Box
- VBA - Input Box
- VBA - Variables
- VBA - Constants
- VBA - Operators
- VBA - Decisions
- VBA - Loops
- VBA - Strings
- VBA - Date and Time
- VBA - Arrays
- VBA - Functions
- VBA - Sub Procedure
- VBA - Events
- VBA - Error Handling
- VBA - Excel Objects
- VBA - Text Files
- VBA - Programming Charts
- VBA - Userforms
- VBA Useful Resources
- VBA - Quick Guide
- VBA - Useful Resources
- VBA - Discussion
VBA - Day Function
The Day function returns a number between 1 and 31 that represents the day of the specified date.
Syntax
Day(date)
Example
Add a button and add the following function.
Private Sub Constant_demo_Click() msgbox(Day("2013-06-30")) End Sub
When you execute the above function, it produces the following output.
30
vba_date_time.htm
Advertisements