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.

10 REPLIES 10

Hi @Ankur Bawiskar@Swapna Abburi 

My source field is g_hiredate which is of string type and target field is new_joining which is of date type.

Hi @kamadi lokeshra 

Please share the screenshot of transform field mapping. Did you configure the Date format to match with source field format?

 

After data import, what value is being updated in your target field?

Hi @Swapna Abburi ,

 
 
 

source string .jpg

ā€ƒStart date is source data of string type

transform.jpg

ā€ƒAfter data import it is showing empty  new joining date.

 

Loaded data of start date


@kamadi lokeshra 

in the date format in field map use this and then load again

dd-MMM-yyyy

šŸ’” 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