18

As the question states i tried

UPDATE mytable set end_date="2015-07-17 22:00:00+00" WHERE id=8244;

But this does not work for obvious reasons, all the detail on the web is about searching for dates not updating them, especially when they have timezones

1 Answer 1

27

Postgres is a little different in that single and double quotes do wildly different things.

So the fix here is to make sure to use single quotes:

UPDATE mytable set end_date='2015-07-17 22:00:00+00' WHERE id=8244;
Sign up to request clarification or add additional context in comments.

2 Comments

oh so the double quotes were the problem
Yes. Double quotes are usually used to specify the delimited identifiers in the database. This is how they are defined in most of RDBMS.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.