1
I have a column called produtodata
which has the following datetime format:
1753-01-01 00:00:00.000
I need to filter the records that are between the date '2019-06-26 00:00:00.000' until today.
I tried something like:
SELECT produtodata, * FROM PRODUTO WHERE PRODUTODATA BETWEEN CAST('2019-06-26 00:00:00.000' AS DATETIME) AND CAST('2019-09-09 00:00:00.000' AS DATETIME)
But I get:
Conversion of a data type scan into a data type datetime resulted in a value outside the range.
I also tried without CAST, but I get the same error.
Are you sure it’s Mysql?!
– José Diz
@José Diz sql, changed tag.
– veroneseComS