0

I am looking to get the row which has the date is equal to 2017-01-12. The date has field type timestamp without time zone. I tried

SELECT * FROM tabl WHERE date = 2017-01-12;

What is the correct syntax?

1

2 Answers 2

1

try:

SELECT * FROM tabl WHERE date = '2017-01-12';
0

If that doesn't work, try an explicit cast:

SELECT * 
FROM tabl 
WHERE date = DATE '2017-01-12';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.