dt = restReq.params.get('date');
String s=string.valueOf(dt);
I am trying to convert date to string and i am getting this error.
dt = restReq.params.get('date');
String s=string.valueOf(dt);
I am trying to convert date to string and i am getting this error.
Best Answer
That error means that your SOQL is trying to bind a Date field to a String value:
Instead, you will want to make the variable a date:
Note: You'll need to determine which DateTime method you need (e.g. DateTime.parse, etc) based on the date's format.