Date Searches

6 posts by 2 authors in: Forums > CMS Builder
Last Post: March 31, 2009   (RSS)

By gkornbluth - March 27, 2009

I’m trying to set up some search criteria for an arts organization events list.

There are date fields set up for a start date and an end date among others.

Some events extend over many months.

Example: If the start date is January 2009 and the end date is June 2009 and someone searches for April 2009 events, they would like that event to appear in the list.

Any ideas?

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Date Searches

By ross - March 27, 2009

Hi Jerry

Thanks for posting!

Could you show me the page you are doing your searching on? I'd like to see how you have it setup :).

We do date searching fairly often for things like expired articles so there should be an option for you here.

Let me know :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Date Searches

By gkornbluth - March 28, 2009

Hi Ross,

Thanks for looking at this. It's a pretty simple page.

Just a listing page with 2 date format fields... A start date date field and and end date field, a title, an image, and a short description of the event. (Right now the date fields are still text fields)

You can see it at:
www.artistsofpalmbeachcounty.org/events.php

Thanks,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Date Searches

By ross - March 30, 2009

Hi Jerry

Thanks for the link :).

I am actually thinking that instead of setting up a bunch of search code, use the built in "removeDate" function.

To use this, just change the field name of your end date to "removeDate" (for both the label and the field name) and that should be it.

From there, your items will only be displayed if the current date before what you select in that field.

CMS Builder will automatically stop showing them once the event is over.

Give this a shot and let me know how you make out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Date Searches

By gkornbluth - March 30, 2009

Good afternoon Ross,

I think you may have been misled by the way I described the situation.

In the above, let's say a user searches for "April" events as their search criteria and the start date of an event is in "March" and the end date is in "May".

I'm assuming that an "April" listing won't show in the result list unless I've programmed the search to show any "Month" that matches the start date month, or the end date month, or that is between a start date month and the end date month?

I just don't have a clue how to do that.

Thanks,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php