This topic is locked

Advanced Search

11/18/2009 3:25:49 PM
PHPRunner General questions
C
chinwag author

Dates are inputted in my system in the format yyyy-mm-dd and show up in search results. However, if users import data in the yyyy/dd format the search doesn't function correctly. I would like both formats to work with search. What do I need to change?

J
Jane 11/19/2009

Hi,
unfortunately there is no easy way to convert dates on the advanced search page on the fly.

You need to edit generated files manually. However this task requires a lot of custom coding.
As workaround you can set up date as Dropdown boxes on the "Edit as" settings dialog.

C
chinwag author 11/19/2009

I mean when users use the normal add method via the table_add.php, they can select a date using drop down boxes or the datepicker. This stores them in a my DATE field of my table.... this is a VARCHAR field and it stores them yyyy-mm-dd with the hyphens.
Many users are importing large sums of data using excel. The dates are actually written yyyy/mm/dd with the slashes.
These import into the DATE field fine as it is a VARCHAR field. The problem is when users use advanced search to search for things from specific dates. The advanced search can't find items with the slashes i.e. yyyy/mm/dd. It can only find items with the hyphens i.e. yyyy-mm-dd

J
Jane 11/20/2009

Hi,
unfortunately search won't work for these data.

You should to set up field as date in the database and convert all values to one format.