I have the following condition:
WHERE sv_users.userDataNascimento LIKE '%95%';
And this condition searches on a date ( 11/12/1995
), type VARCHAR
and not Timestamp
, a year ending with the numerals 95
. This numeral is the result of a calculation I make in my code to find the year the user searched for the filter in a form.
I arrive in the year through this calculation:
ageSigned - Year Running = Year of Birth
That's where I put the query. So far so good.
But if I want to search in this field for a date that is less than or greater than the numeral obtained in the calculation, for example dates ( VARCHAR
) that end with the last two numerals smaller than the result of the calculation ( which in this case is 95
), how do I? What do I use?