Transform map: How to change date/time format on field map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2024 11:53 PM
Hi,
In our system, SNOW sends computer last scan date to ServiceNow everyday through Transform map. We see on SNOW the last scan date is in the format 5/3/2024 3:55:50 PM but in ServiceNow Staging table the last scan date is in format 2024-05-03 03:55:50
AM/PM is missing in the staging table record. So it seems SNOW is sending the data in 12h format but ServiceNow is excluding AM/PM from the end and not identifying whether it's 03 PM or 15. Please assist here as changing format in SNOW is not possible.
Field map date format is yyyy-MM-dd HH:mm:ss
Thanks in advance!
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2024 01:25 AM
As proof, below is the field mapping I've done on an example import table.
Below is the incoming payload (note the field type on the import set is a string field)
And the result in the target table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 05:11 AM
when you define the field map for the target date/time field simply update the format as this and system will handle it automatically
MM/dd/yyyy HH:mm:ss a
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 09:25 PM - edited ‎05-20-2024 10:50 PM
Hi,
It is still not working the last scan date in the staging table are all between 01:00 and 12:59, so it seems they are still in the 12h format. We should have something also between 00:00 - 00:59 and 13:00 - 23:59 to identify AM/PM.
Maybe because the Last scan field on staging table is string type not date/time, also we are not able to change the type. Can you suggest here if we have to write a script here?
Thanks