
372
|
Chapter 12: The Language Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
rendered beginning and ending statements unnecessary. A single VB source code file in
.NET, on the other hand, can contain multiple code modules and other types.
See Also
Class...End Class Statement
Month Function
Class
Microsoft.VisualBasic.DateAndTime
Syntax
Dim result As Integer = Month(dateValue)
dateValue (required; Date)
The source date from which to extract the month
Description
The Month function returns a value from 1 to 12, representing the month of the
supplied date.
Usage at a Glance
With Option Strict set to On, the source value must first be converted to a Date data
type. You can use the
CDate function for this purpose. The IsDate function can also be
used to confirm that the source expression is a valid date.
See Also
DatePart Function, Day Function, MonthName Function, Year Function
MonthName Function
Class
Microsoft.VisualBasic.DateAndTime
Syntax
Dim result As String = MonthName(month[, abbreviate])
month (required; Integer)
The ordinal number of the month, from 1 to 13 (that’s right, 13).
abbreviate (optional; Boolean)
A flag to indicate if an abbreviated month name should be returned. The default
value is
False.
Description
The MonthName function returns the name of a given month, based on the current
regional settings in effect. For example,