You need to sign in to do that
Don't have an account?
sona gaikwad
String Test_DOBOfFamilyHead ;
surveyobj .Test_DOBOfFamilyHead__c;
Invalid identifier ' datetime.newinstance'. Apex identifiers must start with an ASCII letter (a-z or A-Z) followed by any number of ASCII letters (a-z or A-Z), digits (0 - 9), '$', '_'.
datetime.newinstance method now working
Test_survey surveyobj =new Test_survey();
String Test_DOBOfFamilyHead ;
surveyobj .Test_DOBOfFamilyHead__c;
Invalid identifier ' datetime.newinstance'. Apex identifiers must start with an ASCII letter (a-z or A-Z) followed by any number of ASCII letters (a-z or A-Z), digits (0 - 9), '$', '_'.
surveyobj.Test_SurveyDate__c= datetime.newinstance(long.valueOf(String.valueOf(reqData.Test_Survey_Date)));
If you are trying to convert the date to datetime then refer the below:
Date dt = reqData.Test_Survey_Date;
Datetime dt = datetime.newInstance(dt.year(), dt.month(),dt.day());
Please refer this Doc: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_datetime.htm
Can you please Let me know if it helps or not!!!
If it helps don't forget to mark this as a best answer!!!
Thanks,
Maharajan.C