Transform Maps Date/Time updating wrongly

Jake Adams
Tera Contributor

Hi, 

 

The Target Date/Time is updating by adding extra 2 or 3 hours

 

For e.g:) My Source field string field value is 2024-05-09 11:29:47.0

 

Using the source script in the field mapping I am removing the .0

 

answer = (function transformEntry(source) {
var date= source.field_name;
var arrSplit = date.split(".");
var finalString = arrSplit[0].toString(); 
return finalString ();
 
})(source);

 

But the target date/time field is updated as 09/05/2024 15:07:19

 

Kindly assist.

15 REPLIES 15

@Jake Adams 

Hope you are doing good.

Did my reply answer your question?

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