Returns the year from a date as a four-digit number
Syntax
YEAR(date)
- date—The date from which you want to return the year.
Sample usage
YEAR([Due Date]5)
Examples
This example references the following sheet information:
Clothing Item | Transaction Total | Units Sold | Sold Date | |
---|---|---|---|---|
1 | Clothing Item T-Shirt | Transaction Total 1,170.00 | Units Sold 78 | Sold Date 02/12/23 |
2 | Clothing Item Pants | Transaction Total 1,491.00 | Units Sold 42 | Sold Date 02/15/23 |
3 | Clothing Item Jacket | Transaction Total 812.00 | Units Sold 217 | Sold Date 02/20/23 |
Based on the table above, here are some examples of using YEAR in a sheet:
Formula | Description | Result |
---|---|---|
Formula =YEAR([Sold Date]1) | Description Produces the year for row 1 of the Sold Date column | Result 2023 |
Formula =SUMIF([Sold Date]:[Sold Date], YEAR(@cell) = YEAR(TODAY()), [Units Sold]:[Units Sold]) | Description Sums the total number of Units Sold for the current year. (In this example, the year is 2023.) Rows 1, 2, and 3 apply. | Result 337 |
Formula =SUMIF([Sold Date]:[Sold Date], YEAR(@cell)=YEAR(TODAY()), [Transaction Total]:[Transaction Total]) | Description Sums the total amount of Transaction Total for the current year. (In this example, the year is 2023.) Rows 1,2, and 3 apply. | Result 3,473 |
Still need help?
Use the Formula Handbook template to find more support and resources, view 100+ formulas, review a glossary of every function that you can practice working with in real time, and find examples of commonly used and advanced formulas.
You can find examples of how other Smartsheet customers use this function or ask about your specific use case in the Smartsheet online Community.