I have a syntax, but it doesn't work.
Here is my query:
SELECT *
FROM aqua.reading
WHERE
CAST(reading.pres_date AS VARCHAR)
BETWEEN LIKE '2022-10-18%' AND LIKE '2022-10-18%'
it says:
ERROR: type "like" does not exist
LINE 1: ... WHERE CAST(reading.pres_date AS VARCHAR) BETWEEN LIKE '2022...
^
SQL state: 42704
Character: 77
I am trying to get all the data with timestamp and timezone and implement a date range
%from your two dates and just use BETWEEN.WHERE reading.pres_date BETWEEN '2022-10-18' AND '2022-10-18'BETWEEN .. AND .., when beginning and ending dates are the same, makes no sense.... WHERE reading.pres_date = '2022-10-18'. Assumingreading.pres_dateis actually adatetype value.