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
VishwanathVishwanath 

how to retrieve Current year

Hi,

how to retrieve current year in apex class

goabhigogoabhigo

Check this link for more details about date methods:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_date.htm

 

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

 

Let me know if it solved the question.

Martin MurphyMartin Murphy
Solved Mine!