Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invalid start date for creation date range
04-01-2011, 07:43 PM,
#1
Invalid start date for creation date range
Sorry:
When I put a date in a search form it says me: "Invalid start date for creation date range"
My browser is firefox in spanish version.
Can anybody help me?
Thank
Reply
04-04-2011, 09:56 PM,
#2
RE: Invalid start date for creation date range
(04-01-2011, 07:43 PM)lpalacin Wrote: Sorry:
When I put a date in a search form it says me: "Invalid start date for creation date range"
My browser is firefox in spanish version.
Can anybody help me?
Thank

It is a bug in letodms. I just fixed it in the svn. The next release 3.0.0 RC5 will have the fix.

Uwe
Reply
04-05-2011, 02:00 AM, (This post was last modified: 04-05-2011, 03:12 AM by lpalacin.)
#3
RE: Invalid start date for creation date range
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
04-05-2011, 02:56 AM, (This post was last modified: 04-05-2011, 02:08 PM by steinm.)
#4
RE: Invalid start date for creation date range
(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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Contact Us | LetoDMS Community Forum | Return to Top | | Lite (Archive) Mode | RSS Syndication