Equinox Online Help - Language Reference - A to Z
Dayofyear |
|
|---|---|
| Applies to | ![]() |
| Syntax | Dayofyear(DateExpression) |
| Action | [Function] Returns the day of the year for a specified date. |
| Scope | Usable 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. |
| Category | Date 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) ThenAlert "Bill's birthday is before Ben's"end if |
