VBA/Excel/Access/Word/Date Functions/Day

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

Day(Date)

   <source lang="vb">

Sub Main1()

  Debug.Print "Today"s date is: " & Date
  Debug.Print "The day of the month is: " & Day(Date)

End Sub

</source>
   
  


Day(date) returns a Variant/Integer between 1 and 31, inclusive, representing the day of the month for date

   <source lang="vb">

Sub dateDemo5()

  If Day(Date) = 1 And Month(Date) = 1 Then MsgBox "Happy new year!"

End Sub

</source>