Gossamer Forum
Home : Products : DBMan : Installation :

Searching on Dates

Quote Reply
Searching on Dates
Is there any way I can search on monthly bases i.e. All records added in January, February, etc...

Is there something I can put in the search condition of dates to look for patterns (like Jan, Feb,...). It seems that I can only do greater than or less than searches (&Reg_Date=%3E... or &Reg_Date=%3C...)

Thanks
-JO
Quote Reply
Re: Searching on Dates In reply to
You have to use the greater-than and less-than searches.



------------------
JPD
Quote Reply
Re: Searching on Dates In reply to
But there's no reason you should have to if you are not doing a range search. Remove:

Quote:
($db_sort{$column} eq 'date') and (&date_to_unix($in{$column}) or return "Invalid date format: '$in{$column}'");

from sub query in db.cgi, around line 340. Right after:

if ($in{$column} !~ /^\s*$/) {

That should give you the best of both worlds.

Cheers,

Alex
Quote Reply
Re: Searching on Dates In reply to
Hello Alex, JPD,

I deleted the stuff that Alex said and it works fine. I can now search on dates using strings.

Thanks.

Also, you say that I will not be able to do range searches now. Can you give me an exaple of a search that would not work now?

Cheers
-JO
Quote Reply
Re: Searching on Dates In reply to
No, everything should work now. Range searches and all!

Cheers,

Alex