Not sure how to use the NOW()
function in presto. Seems like it should be straight forward, but i'm getting no luck
SELECT DISTINCT field
FROM table
WHERE field BETWEEN '2019-01-01' and NOW()
field = varchar
You should match data types to avoid implicit conversions:
SELECT DISTINCT field
FROM table
WHERE CAST(field AS DATE) BETWEEN DATE '2019-01-01' AND CURRENT_DATE;
SELECT DISTINCT field
FROM table
WHERE DATE(field) BETWEEN DATE '2019-01-01' AND CURRENT_DATE;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With