Date search on browse form

Date search on browse form

Postby vario » Fri Mar 18, 2016 8:12 pm

I have a browse form one column of which contains a date. The table column in MySQL is declared as "date". There are occcasions when I search for a specific date and the results show many other non-matching dates as well. Specific dates, "2016-02-12", "2016-03-03 & "2016-03-10" for example, cause this error. What is going on? It doesn't make any difference if I set a format on the browse column or not.
Also, why do I always have to search on "YYYY-MM-DD" when the browse column is not in that format?

**Update - I have tried changing the database table to store date as varchar(10), but the problem still exists.

Neil.
vario
 
Posts: 36
Joined: Mon Dec 05, 2011 8:53 pm

Re: Date search on browse form

Postby admin » Thu Mar 31, 2016 8:15 am

vario,

Can you send a picture of the problem?

Steven.
admin
Site Admin
 
Posts: 3233
Joined: Mon Jun 15, 2009 9:53 am

Re: Date search on browse form

Postby vario » Sat Apr 02, 2016 1:03 am

Steven,

I created a test form to provide a screen shot (sensitive data on production form) and in doing so solved the problem! I had a zero-length date field on the browse which I had forgotten about, and this was providing the extra matches...

This does leave the issue of why I have to search using YYYY-MM-DD, otherwise please feel free to delete this thread!

Neil.
vario
 
Posts: 36
Joined: Mon Dec 05, 2011 8:53 pm

Re: Date search on browse form

Postby admin » Tue Apr 05, 2016 11:48 am

.
admin
Site Admin
 
Posts: 3233
Joined: Mon Jun 15, 2009 9:53 am


Return to General



cron