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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2022 05:34 AM
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!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2022 06:45 AM
Hi,
all other fields are working fine when you print
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2022 08:42 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 02:39 PM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2022 05:34 AM
@jxsaxton421 No, I have not opened a case with HI.