VBA/Excel/Access/Word/Excel/Month

Материал из VB Эксперт
Перейти к: навигация, поиск

Month(Date)

   <source lang="vb">

Sub Main5()

  Debug.Print "Today"s date is: " & Date
  Debug.Print "The month is: " & Month(Date)

End Sub

</source>
   
  


Month(date) returns a Variant/Integer between 1 and 12, inclusive, representing the month for date

   <source lang="vb">

Sub dateDemo8()

  Debug.Print Month(Date) & "/" & Day(Date)

End Sub

</source>
   
  


Month("Feb 4, 1900") returns 2

   <source lang="vb">

Sub monDemo()

   Debug.Print Month("Feb 4, 1900")

End Sub

</source>