Custom Script

Custom Script

I have created a custom script to trigger on submission to replace the subject with 2 custom fields.  Everything is working, but how do I modify the format of the date to mm/dd/yyyy?


Custom Script:

var x=$CS.getValue("ServiceReq_15001_UDF_CHAR1");
var y=$CS.getValue("GUDF_DATE1");
var new_subject='NEW: ' + x + ' - ' + y;

if($CS.isFormSubmit()){
  $CS.setValue("SUBJECT",new_subject);
}

Subject:

NEW: Howard Stern - Fri Aug 25 2017 17:00:00 GMT-0400 (Eastern Daylight Time)

Thanks in advance


                  New to ADSelfService Plus?