Date out of String with nice Format

Date out of String with nice Format

Hello everyone,

I have a script to write a custom Date into the subject of a request via the Field and Form Rules.
Unfortunatley the Date given out by the system is to long, I would like to convert to DD.MM.YYYY.

Would and of you have any Idea how to archive this.

Script I'm using is this one right now (takes two fields and some text to go into the subject field)


var StartDate=$CS.getValue("ServiceReq_1504_UDF_DATE1");

if($CS.isFormSubmit()){
$CS.setValue("SUBJECT"," "Datum: " + StartDate);
}

                  New to ADSelfService Plus?