You need to sign in to do that
Don't have an account?
Date change to current year
Hello
I am trying to populate rates (custom table) based on product code into Account. Rate have begin and end dates. I am writting a trigger to update rates. To get correct rates I need to covert contract_Start__c to current year like change 4/1/2008 ro 4/1/2011
How can I change any date mm/dd/yyyy to mm/dd/2011 ( current year)
Rate Table
Begin date - 1/1/2010 End date 12/31/2011 Rate: $114.56
Account field Contact start date sample data
4/1/2008
1/1/2009
5/1/2010
Here is my query so far
public static void UpdateProductRates(Account [] accs){ SELECT E_Rate__c, E2_Rate__c Rate_Table_ID__c, Id, Start_Date__c FROM Product_Rate__c where Rate_Table_Id__c IN : accs.product_code__c) AND .... this where I am stuck
How can I change date in the list accs?
My filter should look like accs.contract_start__c > product_rate__c.start_date__c and Contract_start__c < product_rate__c.end_date__c
Any pointers on how this can be done. the tough part is to make my SOQL bulk
Thanks for your time.