You need to sign in to do that
Don't have an account?
troutguy
How to update date record through System Log?
I’m trying to update a date field. What is the format to use? My question is for 3rd line below: used double quotes and that failed, used single quotes & that failed, tried putting data to be updated in different formats but they all failed. Running this through System Log in SFDC GUI.
opportunity ssr = [select id, name, contract_sign_date__c from opportunity where name = 'Upgrade Walkenig'];
System.debug('Results… ssr ' + ssr);
ssr.contract_sign_date__c = "2005-02-08";
update ssr;
Use
this
opportunity ssr = [select id, name, contract_sign_date__c from opportunity where name = 'Upgrade Walkenig'];
System.debug('Results… ssr ' + ssr);
//YYYY MM DD
ssr.contract_sign_date__c = Date.newInstance(2005 ,02,08);
All Answers
Use
this
opportunity ssr = [select id, name, contract_sign_date__c from opportunity where name = 'Upgrade Walkenig'];
System.debug('Results… ssr ' + ssr);
//YYYY MM DD
ssr.contract_sign_date__c = Date.newInstance(2005 ,02,08);
Thanks - that worked!