Transform map: How to change date/time format on field map?

Ridhima_1
Tera Contributor

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

7 REPLIES 7

As proof, below is the field mapping I've done on an example import table.

 

KieranAnson_0-1716366158423.png

 

Below is the incoming payload (note the field type on the import set is a string field)

KieranAnson_1-1716366303149.png

And the result in the target table

KieranAnson_2-1716366320516.png

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Ridhima_1 

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

AnkurBawiskar_0-1716207101462.png

 

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

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