WHERE bpm_status = '3' AND DATE_FORMAT( '2021-10-10', '%Y' ) BETWEEN DATE_FORMAT( plan_time, '%Y' ) AND DATE_FORMAT( plan_time_end, '%Y' ) AND DATE_FORMAT( '2021-10-10', '%m' ) BETWEEN DATE_FORMAT( plan_time, '%m' ) AND DATE_FORMAT( plan_time_end, '%m' ) +++++++++++++++++++++ ATE_FORMAT( '2021-10-10', '%m') 这个直接可以写成 ${月份} |