Importing Date Fields from Excel to ServiceNow Via Transform Map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 11:19 AM
I have an Excel file of about 1300 records and 22 fields, 4 of which are Date fields. I am trying to import them into a Custom table we have in ServiceNow, and am having problems with the date fields. It is wildly inconsistent. One field imports just fine, another imports with the wrong century (i.e. year 1905 instead of 2005), and another won't import at all! The funny thing is, in ServiceNow, they are all Date fields, and in Excel, they are all set-up the same, so they should all behave consistently.
I have tried using the default "yyyy-MM-dd HH:mm:ss" format on my Transform map. I have also tried "yyyy-MM-dd" and "MM/dd/yyyy". None of them worked for all fields. In Excel, I have tried importing them looking EXACTLY the same as the format on the Transform map. I have tried having the dates entered as date win Excel, with the desired format. I have also tried making them text entries instead, in the same expected structure. I cannot get anything to work!!!
Is there any sort of "best practice" for importing date fields to a ServiceNow table from an Excel file via a Transform map? I am a wiz with Excel, so I can put the Excel file fields it in ANY format that ServiceNow wants. I just cannot seem to find one that it likes. I just need to know what it wants!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 01:44 PM
I provided a very detailed explanation in the last post of exactly what is going on. The problem is not with the Excel file. I am not sure what is going on, but there are only 54 dates in that column that is not missing. I have already wasted a few days trying to figure this out. At this point, I am going to just manually enter those 54 missing dates. This project has deadline and we need to get the data in so we can proceed with the next step.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 05:18 PM
@jmiskey Hello! Have you figured out how exactly do it? I'm trouble about that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 06:48 AM
No, after importing I ended up entering them missing dates manually, as I alluded to in my last reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 06:40 AM
I had a similar issue and resolved with the following Transform Map Field Map script
var dateString = source.u_date;
target.date = new GlideDateTime(dateString).getValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2025 04:51 AM
Can anyone suggest, what if I just need to insert the date in dd-MMM format? Is this achievable?