查询日期上月:format(MONTHDELTA($查询日期,-1),'yyyy-MM')或if(right($查询日期,2)==01,(year($查询日期)-1)+"-"+12,if(right($查询日期,2)<=10 && right($查询日期,2)>1,CONCATENATE(year($查询日期),"-","0",(right($查询日期,2)-1)),year(today())+"-"+(right($查询日期,2-1))))查询日期上年同期:format(MONTHDELTA($查询日期,-12),'yyyy-MM') 或year($查询日期) - 1 + "-" + (right($查询日期, 2))涉及到跨年查询,上月和上年同期日期就算错