0
In Mysql I have a table that has two DATE fields: data_inicial
and data_final
.
In the System I have a Field (Textfield) where I type a date.
This date does not need to be precise, but corresponds to the range.
Example:
Field Value: 2015-10-05
Values in the Table:
Initialdata_ | Final:
2014-12-18 2015-12-18
2015-12-19 2016-12-19
My SQL:
SELECT Id, data_inicial, data_final, valor FROM periodos WHERE PasseioId = 1 and (data_inicial >= 2015-10-14 and data_final <= 2015-10-14)
Search comes empty
– Luiz Felipe
Did you perform the search using the example in datetime format? Tried using date only? I formatted the answer
– Marcelo de Andrade