DaysInMonth

Purpose

This function returns the number of days in the month of a date value supplied to it.

Parameters

Parameter: date
Type: date
Description: This is a date object for which you wish to know how many days are in that month.  The day of the month in the date object is ignored.

Returns

Return value: number of days
Type: short integer
 

Example

Dim dte As Date = DateTime.Parse("April 1, 2006")
hs.WriteLog("Info","There are " & hs.DaysInMonth(dte).ToString & " days in the month of April, 2006")

See Also

DaysLeftInMonth
DaysLeftInYear
WeekNumber
WeeksLeftInYear