Gossamer Forum
Home : Products : DBMan SQL : Discussion :

searching date fields

Quote Reply
searching date fields
Hi,

The default templates do not have an elegant date field selection Did someone write more elegant template code for this? I am thinking of things like separate day, month and year combo boxes and the ability to specify an interval (like between 2002-03-15 and 2002-05-12) or a period (like 2001 or January 2002). I am not completely sure that this is possible in DBMan SQL 2.1.

Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] searching date fields In reply to
Hi,

Hm, this thread is not really getting busy. Tongue Maybe I should ask more specific questions:
  • the default way of searching for a date is to enter a date in a text field and specify 'Exact match', 'Not equal', 'Less then', 'Greater then'. Is it possible to enter two dates as an interval?

  • Is it possible to make separate fields for 'year', 'month' and 'day'?

  • Is it possible to show all entries in a certain month or year?

Thanks for your help, Jasper

http://www.bookings.org

Last edited by:

jaspercram: Oct 28, 2002, 8:03 AM
Quote Reply
Re: [jaspercram] searching date fields In reply to
Hi,

>>the default way of searching for a date is to enter a date in a text field and specify 'Exact match', 'Not >>equal', 'Less then', 'Greater then'. Is it possible to enter two dates as an interval?

You can use:

<input type=text name="field_name-gt" value="">
<input type=text name="field_name-lt" value="">

Or

<input type=text name="field_name-ge" value="">
<input type=text name="field_name-le" value="">

>>Is it possible to make separate fields for 'year', 'month' and 'day'?
>>Is it possible to show all entries in a certain month or year?

The search engine does not support for this issue, so you should custome your code.

TheStone.

B.
Quote Reply
Re: [TheStone] searching date fields In reply to
Thanks for the tip! I just wrote a Plugin for advanced date search using the tags that you mantioned. Details can be found in thread 221914.

http://www.bookings.org

Last edited by:

jaspercram: Nov 5, 2002, 8:23 AM
Quote Reply
Re: [TheStone] searching date fields In reply to
Hi Stone,

It seems that 'field_name-gt', 'field_name-ge', 'field_name-lt', 'field_name-le' are not carried over by the speedbar which make them quite useless. Frown

Any idea how to fix this?

Jasper

BTW I only tested it on qsearch_results, so I am not sure whether it works on search_results...

http://www.bookings.org
Quote Reply
Re: [jaspercram] searching date fields In reply to
Hi Jasper,

Please download the attached file which should replace /../Dbsql/Relation/Home.pm and fixes the problem.

TheStone.

B.