Day (function)

Syntax

Day(date)

Description

Returns the day of the month specified by date.

Comments

The value returned is an Integer between 0 and 31 inclusive.

The date parameter is any expression that converts to a Date.

Example

This example gets the current date and then displays it.

Const crlf = Chr$(13) + Chr$(10)

Sub Main()

  CurDate = Now()
  MsgBox "Today is day " & Day(CurDate) & " of the month." & crlf & "Tomorrow is day " & Day(CurDate + 1) & "."
End Sub

See Also

Minute (function); Second (function); Month (function); Year (function); Hour (function); Weekday (function); DatePart (function).

More information

D