em nhập vào starDate và toDate nhưng khi chạy nó lại thành 2019-03-30 hết…
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY/mm/dd");
if (startDate != null) {
strFromDate = simpleDateFormat.format(startDate);
}
if (toDate != null) {
strToDate = simpleDateFormat.format(toDate);
}
SET @sqlCriterial = CONCAT(@sqlCriterial,' and DATE_FORMAT(orders.ORDER_DATE,"%Y/%m/%d") >= DATE_FORMAT(str_to_date(CONCAT("', startDate ,'"," 00:00:00"),"%d/%m/%Y %H:%i:%s"), "%Y/%m/%d")');