Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Date search on browse form

Locked
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Date search on browse form

Unread post by vario »

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.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Date search on browse form

Unread post by admin »

vario,

Can you send a picture of the problem?

Steven.
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Date search on browse form

Unread post by vario »

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.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Date search on browse form

Unread post by admin »

.
Locked