Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DAYOFYEAR Function
Collapse the table of content
Expand the table of content

DAYOFYEAR Function

Office 2007

Returns an integer, 1 to 366, representing the sequential day of the year in datetime or expression. The DAYOFYEAR function uses the Gregorian calendar.

Syntax

DAYOFYEAR("datetime"|expression[,lcid])

Remarks

Any time component in datetime or expression is discarded.

The result corresponds to January 1 to December 31. No rounding is done. If datetime is missing or cannot be interpreted as a valid date or time, the function returns an error.

The DAYOFYEAR function also accepts a single number value for expression where the integer portion of the result represents the number of days since December 30, 1899.

Example 1

DAYOFYEAR("May 30, 1997 13:45:24")

Returns 150.

Example 2

DAYOFYEAR(DATEVALUE("May 30, 1997")+7 ed.)

Returns 157.

Example 3

DAYOFYEAR(35580.6337)

Returns 150.



Community Additions

ADD
Show:
© 2015 Microsoft