How To Use Excel Year Function
The excel year function returns the year component of a date as a 4 digit number.
How to use excel year function. Date 1999 1 1 jan 1 1999 date 2010 6 1 jun 1 2010. In this example we re wanting to see the date that s 10 years past an existing date. Use the year function to extract the year from a date into a cell. The excel year function returns the year corresponding to date as a 4 digit number starting from 1900 until 9999. Use the day function to extract a day number and use the month function to extract a month number.
For example you can use the date function to create the dates january 1 1999 and june 1 2010 like this. It can be used as a worksheet function ws and a vba function vba in excel. Year is an inbuilt function in excel that can be used both as worksheet function and vba function in excel. The year function is an excel date time function that is used for calculating the year number from a given date. Returns the serial number of the date before or after a specified number of workdays using parameters to indicate which and how many days are weekend days.
Year can extract the year value from the supplied value. Where a2 is a cell containing the date. To calculate a year based on a date entered in some cell you use the excel year function exactly in the same way as we did in the previous example. Using dates in financial modeling is very common and the year function helps extract a year number from a date into a cell. Add 10 years to date in another cell.
You can use the year function to extract a year number from a date into a cell or to extract and feed a year value into another formula like the date function. Converts a serial number to a year. As a worksheet function the year function can be entered as part of a formula in a cell of a worksheet. Returns the year fraction representing the number of whole days between start date and end date. The year function is a built in function in excel that is categorized as a date time function.
As you can see from the above snapshot the year to date in column b. For example year 2018 11 25 would return the result as 2018. The formula returns the year from the dates. The function will return an integer that is a four digit year corresponding to a specified date. Get the year from a date.