输入日期为20240216,运行如下代码,结果为true
var reportdate = parent_job.getVariable("v_reportdate");
var date_type = parent_job.getVariable("v_date_type");
var reportdate_f=reportdate.substr(0,4)+ "/" + reportdate.substr(4,2)+ "/" + reportdate.substr(6,2);
var date= new Date(Date.parse(reportdate_f));date_2 = new Date(Date.parse(reportdate_f));var date_3=date_2.toISOString().slice(0,10);
if ( date_3=="2024-02-15" ){
true;
}
else{false;}