Extract The Year, Month, or Day From A Date

Do you use lots of dates in Excel? If you do you probably have needed to use the year, month or day referred to in a date cell in a separate cell. The solution is simple.

Lets say that cell A1 contains the date July 21, 2004 (entered as 21/7/2004 or 7/21/2004 depending on your date system).

You want to extract the year (i.e. 2004) from that date and put it in cell C1. Simply enter the formula =YEAR(A1) in cell C1.

If you want to extract the month, use =MONTH(A1)

If you want to extract the day, use =DAY(A1)

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.