コード例 #1
0
function GetLastMonthFilter($FldExpression)
{
    $today = getdate();
    $lastmonth = mktime(0, 0, 0, $today['mon'] - 1, 1, $today['year']);
    $sVal = date("Y|m", $lastmonth);
    $sWrk = $FldExpression . " BETWEEN " . ewrpt_QuotedValue(ewrpt_DateVal("month", $sVal, 1), EWRPT_DATATYPE_DATE) . " AND " . ewrpt_QuotedValue(ewrpt_DateVal("month", $sVal, 2), EWRPT_DATATYPE_DATE);
    return $sWrk;
}
コード例 #2
0
 function DateFilterString($FldOpr, $FldVal, $FldType)
 {
     $wrkVal1 = ewrpt_DateVal($FldOpr, $FldVal, 1);
     $wrkVal2 = ewrpt_DateVal($FldOpr, $FldVal, 2);
     if ($wrkVal1 != "" && $wrkVal2 != "") {
         return " BETWEEN " . ewrpt_QuotedValue($wrkVal1, $FldType) . " AND " . ewrpt_QuotedValue($wrkVal2, $FldType);
     } else {
         return "";
     }
 }