+ Start a Discussion
maiyakumaiyaku 

I Problem DateTime Calculate

 

Integer A;
ca.SLAs__c = A*60;
ca.Expiration_Date__c = ca.CreatedDate.Minute()+ca.SLAs__c;

 

 

Error: Compile Error: Illegal assignment from Decimal to Datetime at line 197 column 1

 

Thank you so much.

Rahul S.ax961Rahul S.ax961

Hi,

As per your code, it seems that your date formatting is not correct.

 

tyr this:

Integer A;
ca.SLAs__c = A*60;
ca.Expiration_Date__c = ca.CreatedDate.Minute()+Integer.valueof(ca.SLAs__c);

If it wont help, could you paste your code, so that one can help more accurately.