DayOfYear()

Syntax

Result = DayOfYear(Date)
Description
Returns the number of days elapsed since the beginning of the year of the specified date.

Parameters

Date The date value from which to extract the number of days.

Return value

Returns the number of days since the beginning of the year, -1 otherwise. The result is always between 1 and 366.

Example

  Debug DayOfYear(Date(2002, 2, 1, 0, 0, 0))  ; Outputs '32'. (31 days for January + 1)

See Also

FormatDate(), Year(), Month(), Day(), Hour(), Minute(), Second()

Supported OS

All

<- DayOfWeek() - Date Index - FormatDate() ->