You need to sign in to do that
Don't have an account?
stollmeyera
Getting Todays Date - THIS IS EATING AWAY AT ME!!
This is such a simple idea and it is killing me that I can't figure it out. I have APEX in place that automatically creates a campaign. What I am trying to do is get todays date and extract the year into the name of a campaign. In othewords, I want the campaign name to read "YYYY - Campaign Name".
I would love to see some documentation on this, but I can't find anything regarding APEX methods. Can someone please help me??
Integer currentYear = datetime.now().year();
system.debug( 'Current Year------>'+currentYear );
myCampaign = currentYear+campaignName;
Thanks.
TEJ
All Answers
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_methods_system_date.htm
Integer currentYear = datetime.now().year();
system.debug( 'Current Year------>'+currentYear );
myCampaign = currentYear+campaignName;
Thanks.
TEJ
I must be a compete idiot because I actually stumbled upon those docs and didnt think much of them. Was able to figure it out tho.
Thanks for the help, all.