- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:02 AM
Hi,
In my xlsx file the Date filed is written: 04-AUG-2022
Is there any way to change the date format in the transform map so it will know how to get this format from the xlsx file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 03:23 AM
Hi @Alon Grod ,
No we don't have that date format in ServiceNow. ServiceNow date fields will not take if you pass 04-AUG-2022 like this.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:06 AM - edited 01-30-2023 02:06 AM
@Alon Grod Hi!
If user observed fields are created in date or date/time field type in the import set table, change data formatting in the Excel file first. This will make sure all the fields will be created in String field type in import set table.
For example, copy the original cell values out and change the cell formatting to 'Text' and copy back the values into the cell again.
Note 1: Once the field is created in date/time type in the import set table, the field type can not even be changed to String in table dictionary as there is no String option. User needs to drop the import set table, change the data formatting in Excel and import it again. Please refer to below screenshot (1) attached.
Note 2: If the field is created in date type in the import set table, the field type can be manually changed to String type. However, user still needs to change the data format in the Excel file to avoid the same issue happens again.
Note 3: Always make sure correct date format is being selected in the field mapping. The format should be consistent with the imported date or date/time values in the import set table.
Please mark it helpful if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:16 AM
@SoniaShridhar13 I asked if the system knows how to read this format 04-AUG-2022? if yes how it should be written in the transform map format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:17 AM
You can do this via a Field Map Source script. Use the Javascript substring() function to get the pieces of the date to a string that you can then set to a date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:16 AM
Hi @Alon Grod , Have a look at this post Date format transform maps
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thank you