Skip to content
Advertisement

Tag: str-to-date

mysql date conversion returns null converting certain months

I have this query (take a look on between dates): The select is between dates: startDate: (STR_TO_DATE(’11/24/2020′,’%m/%d/%y’)) finishDate: (STR_TO_DATE(’12/26/2021′,’%m/%d/%y’)) This query will return something because there are records on year 2020 the problem is when i change the month of the finishDate, i tried with: finishDate: (STR_TO_DATE(‘1/26/2021′,’%m/%d/%y’)) = null finishDate: (STR_TO_DATE(’01/26/2021′,’%m/%d/%y’)) = null finishDate: (STR_TO_DATE(’10/26/2021′,’%m/%d/%y’)) = null It just makes

Advertisement