You need to sign in to do that
Don't have an account?

Error: Compile Error: Illegal assignment from String to Date
Hi this the error i am getting
Error: Compile Error: Illegal assignment from String to Date at line 95 column 1.
In the code i had make that error line bold.
code:
for (Integer i=1;i<filelines.size();i++)
{
String[] inputvalues = new String[]{};
inputvalues = filelines[i].split(',');
Opportunity opp = new Opportunity();
opp.Name = inputvalues[3];
opp.OPP_DateOfBirth__c = inputvalues[4];
opp.StageName = inputvalues[6];
opp.CloseDate = inputvalues[5];
opptoupload.add(opp);
}
Instead of this opp.OPP_DateOfBirth__c = inputvalues[4];
try using this opp.
Hi thanks for the reply, u tried this but i am getting VF error.
opp.closedate = date.parse(inputvalues[5]);
and can use check what values are coming into inputvalues[5]
Unless a proper date data is received it cannot be assigned to a date field.