Joelster
Joelster

Reputation: 349

excel year() formula returns incorrect year

For some reason the Excel year() formula does not return 2008 as expected!

I am using Excel 2016 (offline version)

Row    C              D                     Formula
1      SourceDate     YearOnly
2      2008/12/01     1905/06/30            =YEAR(C2)

Upvotes: 0

Views: 8079

Answers (1)

Joelster
Joelster

Reputation: 349

Just realized that the Year() formula returns a Number, however I had column D formatted as a Date

Changed this back to number and now I get the correct date as expected!

I also see that I can retain the Date format on column D but must then reconstruct a full date e.g. = Date(Year(C2),1,1)

Upvotes: 1

Related Questions