• troutguy
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

 

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;



Excuse me, as I'm seasoned Java programmer but new to Apex.

 

In Java you would have an import statement, like "import mypackage.thiscompany.com.*;"  The import statement is at top of class, right below package declaration.

 

How do you do an "import" in Apex?

 

What I want to do is reference another class for utilities.    Specifically there are some SFDC code share classes for JSON that I want to use from ANOTHER Apex class.  How to I point to those JSON classes in my own Apex class?

 

http://developer.force.com/codeshare/apex/ProjectPage?id=a0630000002ahp4AAA

 

Another example might be for JavaMail or JDOM; what if a person wanted to use those 3rd party packages via an import?

 

 

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;