We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Convert and populate date of String type to the Date type field using field map script(transform map

kamadi lokeshra
Tera Contributor

Hi Everyone,
I need script for Convert and populate date of String type to the Date type field using field map script(transform map).

Thanking for your response in advance.

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@kamadi lokeshra 

you need not worry to convert string to Date

If your excel/file contains date in MM-dd-yyyy format then simply set that format in your field map and system takes care of everything

55.png

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Swapna Abburi
Giga Sage

Hi @kamadi lokeshra 

You can specify the date format in the transform map field mapping. This will convert the string data from your source record to the date and time format you gave and map the data to target field.

 

Please refer to attached screenshot.