function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

how to retrieve Current year


how to retrieve current year in apex class


Check this link for more details about date methods:


You can use: Integer currentYear = System.Today().year();


Let me know if it solved the question.

Martin MurphyMartin Murphy
Solved Mine!