1

Expected : I want to comapre these two dates without seconds. Eg

  1. '2011-12-30 09:55:56', '2011-12-30 08:55:55' comparison of these two should return TRUE.

  2. '2011-12-30 09:55:56', '2011-12-30 08:54:55' comparison of these two should return FALSE.

0

1 Answer 1

7

Use date_trunc() and "round" the values to minutes:

date_trunc('minute', timestamp '2011-12-30 08:55:56') = date_trunc('minute', timestamp '2011-12-30 08:55:55')
Sign up to request clarification or add additional context in comments.

Comments

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.