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
Danielle HensleyDanielle Hensley 

Code needed to take the year out of the date field to automate emails

Trying to automate the sending of surveys through email on Salesforce by using a process builder. Need a special code to take the year out of the date field so the emails can be sent twice a year around the renewal  month and not just the year of the renewal.
kumud thakur 20kumud thakur 20
In apex you can use : 
date myDate = system.today();
integer year =myDate.year());

===
SF formula
YEAR( myDate ) it returns year of date.
Danielle HensleyDanielle Hensley
How do I begin to integrate into my instance (contact/trigger)? Danielle Hensley Office Administrator Office: +1-843-329-7816 dhensley@phishlabs.com