Sample Code:
Date dat = System.today();
Integer yr = dat.year();
System.debug(‘Year is ‘ + yr);
Cheers!!!
Date dat = System.today();
Integer yr = dat.year();
System.debug(‘Year is ‘ + yr);
Cheers!!!