Syntax:
DaysInYear(dateexpr)
Description:
Returns the number of days in the year of the date specified.
Parameter Description
dateexpr A valid time type or variant that can be converted to a date value
Example:
Sub
Main
'display the number of days in the current year
numberofdaysthisyear = DaysInYear(Now())
'display the number of days in
next year
numberofdaysnextyear = DaysInYear(DateAdd("y",1, Now()))
'display
the number of days in a year of a custom date
numberofdayscustomyear = DaysInYear(DateSerial(2004,02,34))
End Sub
See Also: