Extract Year from Short Date

segran

Active Member
Joined
Aug 20, 2004
Messages
335
Hi,

I have date in this format: 2011/07/15 - cell formatted as DATE.
I used the left function to extract just the year, but I got 4037 and the cell gets converted to DATE format.

How can I extract just the year - just as 2011 for this example?

Thank you
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

I have date in this format: 2011/07/15 - cell formatted as DATE.
I used the left function to extract just the year, but I got 4037 and the cell gets converted to DATE format.

How can I extract just the year - just as 2011 for this example?

Thank you

If you have the date in cell "A1" use "=Text(a1,"YYYY")"
 
Upvote 0
Dates are held as numbers (the number of days since the beginning of 1900).
If your date is in A1 then
=YEAR(A1)
is what you need.
 
Upvote 0
If it is truly formatted as a date you can just use (say date is in A1) enter in A2 =year(A1)

Hope this helps
 
Upvote 0
As per your formula,

Just format that cell to GENERAL. so that You will get Year
 
Upvote 0
As per your formula,

Just format that cell to GENERAL. so that You will get Year

If you format the cell to general you will see the serial number of the Date Excel stores.
Segran,
If you wanted only the year to be displayed, while keeping the Date in the cell intact you can use set the "custom" format "Type:" to "YYYY" in the "Number" tab in the "Format cells" Dialog. To Open it right click the cell and select "Format Cells".
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top