The below code is throwing error
Line 2931: Xmlstreamwriter.writeCharacters((Account.Date_From__c==null)?'':Account.Date_From__c.format('MM/dd/yyyy hh:mm a'));
Compile Error: Method does not exist or incorrect signature: void
format(String) from the type Date at line 2,931 column 115
I tried Changing it to Account.Date_From__c.format('EEEE')
, but didn't work
Best Answer
Date
does not have aformat()
method accepting a string. That method is available only onDateTime
. You can create aDateTime
from aDate
and simply use a format string that does not include time-based components:There's a number of Ideas out there you can vote on, although the point totals suggest they'll never be looked at: one and two (mine).