如何在Excel中将date更改为简单的一年?

如何在Excel中将date更改为简单的一年? 1/2/1989到1989年?

作为工作表公式,

=YEAR(A1) 

作为VBA代码,

 dim yr as integer yr = year(range("A1"))