Unable to format 14/08/2021 00:170 using format string yyyy-MM-dd HH:mm:ss for field start_date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2021 03:41 AM
Hi All,
I am getting error while importing change records using transform map. Please suggest?
com.glide.db.impex.transformer.TransformCoercionException: Unable to format 14/08/2021 00:170 using format string yyyy-MM-dd HH:mm:ss for field start_date
Thanks
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2021 04:04 AM
You might be importing a date into a date/time field. In your transform map, go to the source_field_name field mapping. There should be a field on the left side of the form called 'Date Format'. You should see a list of date formats. Choose the one that matches your data. Reprocess the import set and transform.
Failing that, you can just hardcode the fix by adding a time onto your string. Check source script and use something like this:
var date = source.source_field_name.toString();
answer = date + "00:00:00";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2021 04:14 AM
Hi,
what is 00:170?
14/08/2021 00:170
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
07-29-2021 04:49 AM
by mistake 170. I have tried with correct numbers. It is not working. I have changed the date format in transform map too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2021 04:53 AM
So how does the incoming data look like?
14/08/2021 10:20:45
i.e. dd/MM/yyyy HH:mm:ss
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader