My Formula field I have the code for below :
Integer d = CloseDate.day();
Integer mo = CloseDate.month();
Integer yr = CloseDate.year();
DateTime DT = DateTime.newInstance(yr, mo, d);
Time Difference (Date/Time) = Calculating_Date__c - DT;
Here In Opportunity I try to get the date/Time difference in the date field(Close Date) and date/time field(Calculating Date) to display the difference in the result in date/time field(Time Difference).
But I got this error
Error: Syntax error. Found 'Integer'
I don't know how to be rectified in this error in here.
So please help me to complete the task. For answer's thanks in advance.