VBA/Excel/Access/Word/Excel/Month

Материал из VB Эксперт
Версия от 12:47, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Month(Date)

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



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

 
Sub dateDemo8()
   Debug.Print Month(Date) & "/" & Day(Date)
End Sub



Month("Feb 4, 1900") returns 2

 
Sub monDemo()
    Debug.Print Month("Feb 4, 1900")
End Sub