title: create a new Apex Class to update field with Active or inactive
body: <p>This is my fist time with Apex so Im fumbling around. What I am trying to do is read a date field Contract_Expiration__c and then set pdate_active_status_text__c to null, active, or void. </p>
  
  <p>Any help would be great. Thanks in advance.</p>
  
  <pre><code>public class update_active_status {
      public static String saveData(){
          for (Account a : [SELECT Id FROM Account WHERE CreatedDate &gt; 2000-01-16T10:00:00-08:00]){
                 if (a.Contract_Expiration__c == null ){ 
                     a.update_active_status_text__c = null;
                     update a;
                 } else if (a.Contract_Expiration__c &gt;= Date.today().addDays(60)) {
                  a.update_active_status_text__c = 'Active';
                     update a;
                 } else {
                  a.update_active_status_text__c = 'Void';
                  update a;
                 }    
          }
       }
  }
  </code></pre>