CitectVBA Programming Reference > CitectVBA Function Reference > Date and Time Functions > Day

Day

Calculates the day from the given date argument passed to the function using the Gregorian Calendar.

Syntax

Day(Date)

Date:

A string or expression that can represent a date value. This includes any combination of date literals, numbers that look like dates, strings that look like dates, and dates from functions.

Return Value

Returns a variant date corresponding to the date expression that was passed in.

Related Functions

Date | Year| Month | WeekDay

Example

Dim varMyBDate, varMyDay
varMyBDate = #July 8, 1958#
varMyDay = Day(varMyBDate)
' stores 8 for day value.