//定义字符串类型变量stime,etime,整数型变量flag,此脚本判断加班开始时间是否在两个固定时间点之间,若是将flag赋值为1SimpleDateFormatdf=newjava.text.SimpleDateFormat(yyyy-MM-ddHH:mm:ss);Datesd1=df.parse(OverTimeBill4.entries.startTime);stime=OverTimeBill4.entries.otDate+17:45:00;etime=OverTimeBill4.entries.otDate+18:15:00;stime=stime.substring(0,19);etime=etime.substring(0,19);Datesd2=df.parse(stime);Datesd3=df.parse(etime);longd1=sd1.getTime();longd2=sd2.getTime();longd3=sd3.getTime();if(d1>=d2d1<=d3){flag=1;}else{flag=0;}