Import AD julian date fields to sys_user table: Unable to format using format string yyyy-MM-dd HH:mm:ss to custom ServiceNow date field Issue Whilst attempting to implement the transform script from the community post LDAP Transform Dates - Developer Community - Question - ServiceNow Community The transform script failed with the error Unable to format undefined using format string yyyy-MM-dd HH:mm:ss for field u_windows_account_expiry_dateCauseThe target field was defined with a Date Format and the transform script was not passing a string that could be formatted as a date. When the transform script was copied from the community post it was pasted below the default function: answer = (function transformEntry(source) { // Add your code here return ""; // return the value to be put into the target field})(source); This default function returning the blank answer and thus ignoring the added script copied from the community post.ResolutionWhen creating the transform script overwrite the entire default script with the script from the community post to avoid the default function from interfering. For example, if the following steps had been followed from the community page for bringing in an expiry date field from AD: Create an expiry date field on the user form (date/time)Navigate to your LDAP server Add your AD expiry field name to the attributes section (accountexpires)Save Navigate to your users transform map Add a new field mapTarget field (This will be your new field on the user form)Date Format yyyy-MM-dd hh:mm:ssUse Source Script = true Your sample script could look like the following: //Expiry Date/Time //answer = (function transformEntry(source) { // For update set// Add your code here // This function converts the UTC date/time to local date/timefunction getLocalTimeZoneDateTime(dateTimeUTC) {var gdt = new GlideDateTime(dateTimeUTC);return gdt.getDisplayValueInternal();} var dtUtil = new DateTimeUtils(); if (source.u_accountexpires === undefined) {// set a blank value if the source is 'undefined' target.setValue(u_expiry_date,'');} else if (source.u_accountexpires != 0) {// convert the date from int8 format to GlideDateTime in UTCvar expiresUTC = dtUtil.int8ToGlideDateTime(source.u_accountexpires); // convert the GlideDateTime in UTC to Local TimeZonevar expiresLocal = getLocalTimeZoneDateTime(expiresUTC.toString());//log.info("ExpiresLocal: " + expiresLocal); // Set the value to the Local Time Zone valueanswer = expiresLocal;} else {// set a blank value if the source is anything else.target.setValue("u_expires", '');} //})(source);