//上个月的第一天
firstDay := StrToDate(FormatDateTime('yyyy-mm-1',IncMonth(Now,-1)));
//上个月的最后一天
lastDay := IncMonth(firstDay,1)-1;
//上个月的第一天
firstDay := StrToDate(FormatDateTime('yyyy-mm-1',IncMonth(Now,-1)));
//上个月的最后一天
lastDay := IncMonth(firstDay,1)-1;