CR needs to be logged before 1 PM on the previous day

CR needs to be logged before 1 PM on the previous day

Need help for generating script for a condition where CR will log before 1 PM on the previous day

Condition will be like this, CR entry date by owner will be = Scheduled Start day (00:00:01) – 11:00:00

my SD plus build No - 12000
DB - MSSQL 2012

I have already one script that is running below ensuring the time window is at least 12 hours for new CR creation

var date1=new Date();

var date2=$CS.getValue('SCHEDULEDSTARTTIME');

date2 = new Date(date2);

var diff = Math.abs(date1 - date2);

if (Math.abs(diff/(1000*60*60) < 12)) {

   $CS.stopFormSubmission();

   alert("Ensure the time window is at least 12 hours");  

}

                  New to ADSelfService Plus?