to_char(时间字段,"yyyy-MM")>='${left(yearmonth,4)+"-01"}'
and to_char(时间字段,"yyyy-MM")<='${yearmonth}'
${if(right(yearmonth)='01',"to_char(时间字段,"yyyy-MM")='"+yearmonth+"'","to_char(时间字段,"yyyy-MM")>='"+CONCATENATE(left(yearmonth,4),"-01")+"' and to_char(时间字段,"yyyy-MM")<='"+yearmonth+"'")}