• Harsha508
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hi guys i am new to salesforce when i tried to update the date its showing Method does not exist or incorrect signature: TODAY()

please let me know how to do

here its my code

public class updatedate
{

public date update1()
{
Student__c s1 = [ select Closed_Date__c from Student__c];

if(s1.Closed_Date__c == null)
{
s1.Closed_Date__c = TODAY();
upsert s1;

}
}
public updatedate()
{
updatedate u = new updatedate();
u.update1();
}
}

thanks advance

Hi guys i am new to salesforce when i tried to update the date its showing Method does not exist or incorrect signature: TODAY()

please let me know how to do

here its my code

public class updatedate
{

public date update1()
{
Student__c s1 = [ select Closed_Date__c from Student__c];

if(s1.Closed_Date__c == null)
{
s1.Closed_Date__c = TODAY();
upsert s1;

}
}
public updatedate()
{
updatedate u = new updatedate();
u.update1();
}
}

thanks advance