(04-05-2011, 02:00 AM)lpalacin Wrote: Thanks. For now, I have designed a solution:
It works with mktime
Needed. in the final search.
It works.
In Inc.ClassDMS.php
$searchCreateDate = "";
if ($creationstartdate) {
///if ($createstartdate) {
///$startdate = makeTimeStamp(0, 0, 0, $createstartdate["year"], $createstartdate["month"], $createstartdate["day"]);
///$startdate = makeTimeStamp(0, 0, 0, $createstartdate["month"], $createstartdate["day"], $createstartdate["year"]);
$startdate = mktime (0,0,0, $creationstartdate["month"], $creationstartdate["day"], $creationstartdate["year"]);
///$startdate = mktime (0,0,0, $createstartdate["month"], $createstartdate["day"], $createstartdate["year"]);
if ($startdate) {
$searchCreateDate .= "`tblDocuments`.`date` >= ".$startdate;
}
}
if ($creationenddate) {
///if ($createstopdate) {
///$stopdate = makeTimeStamp (23, 59, 59, $createenddate["year"], $createenddate["month"], $createenddate["day"]);
$stopdate = mktime (23, 59, 59, $creationenddate["month"], $creationenddate["day"], $creationenddate["year"]);
if ($stopdate) {
if($startdate)
$searchCreateDate .= " AND ";
$searchCreateDate .= "`tblDocuments`.`date` <= ".$stopdate;
}
}
That should fix it. I will include a solution which still uses makeTimeStamp() but your approach should work as well.
Uwe