Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invalid start date for creation date range
#3
Thanks. For now, I have designed a solution:
It works with original mktime (no makeTimeStamp)
It was wrong the variable $createstartdate. Is his place $creationstartdate.
Also a "." in the final search.
$searchCreateDate .= "`tblDocuments`.`date` <= ".$stopdate;


In Inc.ClassDMS.php


$searchCreateDate = "";


if ($creationstartdate) {

$startdate = mktime (0,0,0, ["month"], $creationstartdate["day"], $creationstartdate["year"]);

if ($startdate) {
$searchCreateDate .= "`tblDocuments`.`date` >= ".$startdate;
}
}

if ($creationenddate) {
$stopdate = mktime (23, 59, 59, $creationenddate["month"], $creationenddate["day"], $creationenddate["year"]);

if ($stopdate) {
if($startdate)
$searchCreateDate .= " AND ";
$searchCreateDate .= "`tblDocuments`.`date` <= ".$stopdate;
}
}

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: