Equinox Online Help - Language Reference - A to Z

Home

Dayofyear

Applies to
SyntaxDayofyear(DateExpression)
Action[Function] Returns the day of the year for a specified date.
ScopeUsable anywhere.
Notes

This function calculates the day of the year from DateExpression and returns it as a number. The returned date number can take values from 1 to 365 (1 to 366 in a leap-year) inclusive.

CategoryDate handling
See Also Years, Year, Day, Dayname, Dayofweek, Dmy, Dmyadd, Leapyear, Month, MonthName, Months, ServerDateTime, Today, Week, WeekOfYear, WeekStart
Example

The following example compares the day number of two dates, to determine which comes first in the year.

If Dayofyear(BillBirthday) < Dayofyear(BenBirthday) Then
Alert "Bill's birthday is before Ben's"
end if