You need to sign in to do that
Don't have an account?
Vidhyasagaran Muralidharan
date method problem
trigger updateday on case_obj__c (before insert){
for(case_obj__c a :trigger.new)
{
Date dt = a.case_dt__c;
String dayOfWeek=dt.format('EEEE');
a.day__c=dayOfWeek;
}
}
I tried this code but i am gethhing this error:Error: Compile Error: Method does not exist or incorrect signature: [Date].format(String)
whats is the problem?
for(case_obj__c a :trigger.new)
{
Date dt = a.case_dt__c;
String dayOfWeek=dt.format('EEEE');
a.day__c=dayOfWeek;
}
}
I tried this code but i am gethhing this error:Error: Compile Error: Method does not exist or incorrect signature: [Date].format(String)
whats is the problem?
try this it will work
Datetime dt = (DateTime)dt;
String dayOfWeek = dt.format('EEEE');
Good Luck
All Answers
try this it will work
Datetime dt = (DateTime)dt;
String dayOfWeek = dt.format('EEEE');
Good Luck