SELECT IF(DATE_FORMAT(start_time,'%Y-%m-%d')<=DATE_FORMAT(NOW(),'%Y-%m-%d') and DATE_FORMAT(NOW(),'%Y-%m-%d')<=DATE_FORMAT(end_time,'%Y-%m-%d'),'','') a FROM `t_activity`;