Unparseable date: "1": java.text.ParseException: Unparseable date: "1": java.base/java.text.DateFormat.parse(DateFormat.java:395)

Vamsi Sreenivas
Giga Guru

I was trying to run the following code and getting Unparseable Date:'1' Error. In the below code I was querying database view which contains view tables : Assessment Instance Question, Assessment Instance and HR Case. I tried modifying the code and noticed that I get error only when try to dot walk task_id field of Assessment Instance table. Further I tried task_id.getDisplayValue() yet got the error.

Also, I get the same error when I glide record the Assessment Instance table instead of DB view.

 

var grdb = new GlideRecord('sn_hr_core_csat_data');
grdb.addEncodedQuery("aquestion_sys_updated_on>=javascript:gs.dateGenerate('2021-10-20','00:00:00')");
grdb.setLimit(2);
grdb.query();
while (grdb.next())
    gs.info(grdb.aquestion_instance.number + " - " + grdb.ainstance_task_id.number + " - " + grdb.hrcase_closed_by.getDisplayValue());

 

Want to know if anyone came across this error and fixed or what would be the root cause for the error?

Thanks!

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

all other fields are working fine when you print

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar , yes when I print fields other than task_id.<field_name> I'm not getting error.

And after some debug, I came to know that error is logged even when I open assessment instance record in list or form view, particularly on records those have task_id sys_class_name is sn_hr_core_case. So I looked into the query and display business rules on the Asmt instance tables but there are none.

 

Are there any other places / components I need to look into as its confirmed that error is logged particularly when task_id is from sn_hr_core_case?

I believe it happens on all tables when doing some kind of update to them. I have seen the same error on a different table that also extends task. Did you put in a case with HI? 

@jxsaxton421 No, I have not opened a case with HI.