YEARDAY Function

Returns a number representing the day in the year, 1-365, where 1 is the first day of the year.
Sample Usage
YEARDAY([Due Date]5)
Syntax
YEARDAY(
  • date
)
  • date
    The date from which you want to return the day as a number.
Usage Notes
  • For leap years, YEARDAY returns a number between 1-366.
     
Examples

This example references the following sheet information:

  Clothing Item Units Sold Sold Date Order Date Ship Date
1 T-Shirt 78 02/12/19 1:55 PM 02/12/19 02/15/19
2 Pants 42 02/15/19 10:23 AM 02/15/19 03/20/19
3 Jacket 217 02/20/19 2:45 PM 02/20/19 02/27/19

Given the table above, here are some examples of using YEARDAY in a sheet:

Formula Description Result
=YEARDAY([Ship Date]1) Returns the number of days in to the year for the date from the “Ship Date” column on row 1.  46
=IF(YEARDAY([Ship Date]2) < 182, "First Half of Year", "Second Half of Year") Returns the string "First Half of Year" if the number of days in to the year for the date from the "Ship Date" column on row 2 is less than 182. Returns "Second Half of Year" otherwise. First Half of Year
=ROUND([Units Sold]3 / YEARDAY([Order Date]3), 2) + “Avg jackets units sold each day” Divides the value on row 3 of the "Units Sold" column by the number of days in to the year for the "Ship Date" on row 2 and returns the rounded result. Adds the string " Avg Jacket units sold each day." (with a space and period) to the end. 4.25 Avg Jacket units sold each day.