Hi,
I have a customer that is trying to use the SDK to write a date field. Can some one please give some guidance on the code below?
Thanks,
Brian
We are attempting to use the java laserfice SDK interface to write a date field, and it keeps failing. See code snippet below. (Running Laserfiche 9.2 client / server /sdk). Can you help us figure out the correct method to write a date?
Thanks!
Below is the snippet of the java code. It throws 'Bad Field Value' error.
Document document = Document.create(....);
Calendar dateValue = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
dateValue.set(2015, 11, 15, 0, 0, 0);
FieldValueCollection fvc = new FieldValueCollection();
Field effectiveDate = new Field("Effective Date", session);
fvc.add(effectiveDate, dateValue);
document.setFields(fvc);
document.save();