Transform map import to time field

samadam
Kilo Sage

I am trying to import data into table using transform map from excel. I have time fields that I want to import into. Data is in the format 1:00:00 pm. I set the transform map to hh:mm:ss as i dont see option to include am/pm. It is just doing 12:00 for all the records. Is there a way to fix this?

5 REPLIES 5

Abbas_5
Tera Sage
Tera Sage

Hello @samadam,

 

For a similar kind of issue, please refer to the link below:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0955636

 

OR refer to this link:
https://www.youtube.com/watch?v=GXmlAT8OvHI

 

If this is helpful, please hit the thumbs up button and accept the correct solution by referring to this solution in future it will be helpful to them.

 

Thanks & Regards,

Abbas Shaik

Nilesh Pol
Tera Guru

@samadam The Time field type does not natively support parsing time strings with AM/PM (12-hour format). The format hh:mm:ss expects a 24-hour time (e.g., 13:00:00 for 1:00 PM).

recommended: Use a Transform Script to Convert AM/PM to 24-hour Format.

let us know if you need a script.

Shivalika
Mega Sage

Hello @samadam 

 

Instead of using a particular data type - did you just try using string ? Just use string and enter the time in the format that's required, if the value you gave is acceptable, it will automatically take it up. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Ankur Bawiskar
Tera Patron
Tera Patron

@samadam 

the source file has data in this format (1:00:00 pm) and what's the target field type?

Please share some screenshots etc

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